Closed (fixed)
Project:
Thickbox
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Mar 2007 at 16:22 UTC
Updated:
13 Aug 2008 at 14:51 UTC
When uploading picture that is smaller than 'preview' size defined, image.module do not resize original picture, so the same file is used for 'preview' and 'original' pictures. Same thing with thumbnails - in particular, if original picture dimensions is smaller or equal than defined in image.module, the same single file on disk is used for all three variants. That's why the image_load function returns an array with paths to all three pictures.
So, if we have "Enable for image nodes" box checked, it doesn't work correctly all the time (depending on picture size).
Comments
Comment #1
frjo commentedI unfortunately don't use the image module myself and the script that integrates Thickbox with it is contributed from a user.
Hopefully someone using Thickbox with the image module else will contribute a patch.
Comment #2
duntuk commentedyeah noticed the same problem...
there should be an 'if' statement saying 'if preview is not available, load full'
Comment #3
Vallenwood commentedI don't know whether it's because of a recent update to the image module, but this seems to no longer be true. If you look at the
_image_build_derivativesfunction in image.module, if the original image is smaller than the derivative image, it simply copies the original file to the new filename -- but does NOT just use the same filename. So if the original image is smaller than the preview-size dimensions, it copies "original.jpg" to "original.preview.jpg" (for example), without resizing it, but still at least creating a new file.Am I right on this? I don't know whether this is a recent change in the image.module or whether I'm somehow missing something, but I don't see the problem.
Comment #4
grendzy commentedYes I agree, this is how it works for me (using image 5.x-1.2). I removed the
true ||bit from thickbox_auto.js and it works as expected now (loads preview images).Comment #5
drewish commentedthis should be fixed in the current -dev version of the image module.
Comment #6
frjo commentedComment #7
pillarsdotnet commentedBroken again for image-HEAD. See http://drupal.org/node/179855 for a proposed patch.
Comment #8
pillarsdotnet commentedIf the patch at see http://drupal.org/node/179855 gets accepted, thickbox would also need to be patched as follows:
Comment #9
frjo commented