Ticket #638 (reopened defect)
ImageManager sometimes fails to display thumbnails
| Reported by: | koto@… | Owned by: | yermol |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.96 |
| Component: | Plugin_ImageManager | Version: | |
| Severity: | normal | Keywords: | |
| Cc: |
Description
ImageManager plugin does not display existing thumbnail files from images within subdirectories of $IMConfigimages_dir? if $IMConfigthumbnail_dir? is an empty string (i.e. if thumbnails are put in a same directory as image files). The <img> tag produced by plugin interface (rendered by images.php) refers to non-existing file, completely ignoring the subdirectories and assuming the thumbnail resides in $IMConfigimages_dir?.
E.g.: instead of referring to thumbnail automatically created during upload (http://example.com/images/subdir/second/t_image.jpg ) it refers to http://example.com/images/t_image.jpg
Such behaviour occurs only when $IMConfigthumbnail_dir? is an empty string.
Proposed (working) fix:
plugins\ImageManager\Classes\ImageManager.php
Line 315 (getThumbUrl() function) should read:
Return Files::makeFile($this->getImagesURL() . $path_parts['dirname'], $thumbnail);
instead of:
Return Files::makeFile($this->getImagesURL(), $thumbnail);
