WordPress.org

Ready to get started?Download WordPress

Forums

Auto ThickBox Plus
[resolved] [Plugin: Auto Thickbox Plus] Possible to disable auto resizing of images? (2 posts)

  1. sosukeinu
    Member
    Posted 2 years ago #

    Thickbox automatically resizes images that do not fit in the browser window. Is it possible to disable this so that images are displayed full size? Thank you for any help or insight into this matter.

    http://wordpress.org/extend/plugins/auto-thickbox-plus/

  2. attosoft
    Member
    Plugin Author

    Posted 2 years ago #

    Thickbox automatically resizes images that do not fit in the browser window.

    Do not fit? ThickBox official site says that "ThickBox will resize images that are bigger than the browser window.". So I think "ThickBox resizes images that do fit in the browser window.".

    Anyway if you want to disable this feature, I think you need to modify thickbox.js and remove the following code between about line 116-130.

    if (imageWidth > x) {
    	imageHeight = imageHeight * (x / imageWidth);
    	imageWidth = x;
    	if (imageHeight > y) {
    		imageWidth = imageWidth * (y / imageHeight);
    		imageHeight = y;
    	}
    } else if (imageHeight > y) {
    	imageWidth = imageWidth * (y / imageHeight);
    	imageHeight = y;
    	if (imageWidth > x) {
    		imageHeight = imageHeight * (x / imageWidth);
    		imageWidth = x;
    	}
    }

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic