I've set a maximum resolution for images on my site to 665x665, and they look fine when opened up via Thickbox on a screen with a resolution larger than 1024x768. Unfortunately, I've noticed that when I view my site on a screen with a 1024x768 resolution, Thickbox resizes the images to a width of 561 pixels when the thumbnail is opened. Since there are still a good number of users out there still using this resolution, I want to be able to still present images that are not downgraded in quality.

I don't see a problem with having the images open up in their full size, as there would be more than enough space. Is there any way I can tweak the Thickbox module to remove the image resizing function? I looked through the module's code but couldn't see anything that stood out to my layman's eyes.

Comments

frjo’s picture

This function is in the Thickbox JavaScript itself. I have experimented with making Thickbox leave less empty space around the image.

I have just committed this to HEAD. Please try it out and report any issues here.

David N’s picture

I just tested the updated version of HEAD and it's much better; images appear at the correct size across various resolutions.

Just one question... How can I put the original loading_animation back? Just my personal preference, but I like the old version with the circle and "loading" in the middle.

frjo’s picture

Just replace the image and make the necessary changes in thickbox.css for "#TB_load". Something like this.

#TB_load{
	position: fixed;
	background: url(loading_animation.gif);
	display:none;
	height:100px;
	width:100px;
	z-index:103;
	top: 50%;
	left: 50%;
	margin: -50px 0 0 -50px; /* -height/2 0 0 -width/2 */
}
David N’s picture

Thanks for the tip Fredrik. I changed the CSS as instructed, and the loading animation shows up fine on one part of the site - a separate module that had a Thickbox call added for anonymous viewers. When I try to view images however, I only see maybe 1/4 of the top left corner of the loading animation gif. Would you happen to know what the problem is?

frjo’s picture

Status: Active » Closed (fixed)