The code to determine the path/url to a thumbnail was flawed. It didn't work if there were multiple dots in the path or filename. The included patch fixes that by changing one line.

Also, the patch fixes some issues with url paths. If someone has "private" files, or enters an absolute path to their files directory, this module would render broken images (invalid url's to thumbnails and preview images). The fix was to simply call file_create_url() with the file path when rendering the HTML.

This code was tested with Drupal 4.6 and walkah's sandbox image module.

CommentFileSizeAuthor
img_url_fix.patch2.32 KBjash4

Comments

matt westgate’s picture

The code in the patch to determine the path/url to a thumbnail doesn't work as expected. Instead of rendering the thumbnail it renders the 'preview' copy of the image.

I applied the 'private files' part of the patch however.

matt westgate’s picture

Another patch was submitted and applied that should resolve any remaining issues.