When I choose the display type of the IMCE Image in
admin/content/node-type/node-type-name/display
as Thumbnail I get this code

<div class="field-item odd">
<img id="imceimage-field_image--thumb" alt="caption" src="/domain/sites/default/files/images/thumb_image2.png"/>        
</div>

but no image is displayed and that path has no image with that name in it

meanwhile when I use

"default" or "With Link"
I get this code and the image is properly displayed

<div class="field-item odd">
 <img height="177" width="500" id="imceimage-field_image-" alt="caption" src="/domain/sites/default/files/images/image2.png"/>        </div>
CommentFileSizeAuthor
#3 imceimage.module.patch1.6 KBremy.damour

Comments

AD-DA’s picture

Subscribing, same issue.
The reason is that the thumbnail must be named with a prefix thumb_

There should be an option to configure the naming scheme of thumbnails, or at least a warning somewhere to inform the user.

remy.damour’s picture

Subscribing, same issue when using views with format set to 'Thumbnail' for imce-image type fields.

After looking at source code, it looks like expected name for thumbnail images is 'thumb_'.
But when creating thumbnails with imce, prefixes are among 'small_', 'medium_' and 'large_' but none being 'thumb_'.
It may be the source of the problem.

Could it be possible to harmonize with img-assist module too? When we upload a file using image-assist module, automatically generated templates are using following naming convention: '.thumbnail.'.

Regards,
Remy

remy.damour’s picture

StatusFileSize
new1.6 KB

for those interested, enclosed is a patch that can be used as a temporary workaround for above mentionned problems (views not rendering imce-image when format is set to 'Thumbnail' and/or when thumbnails have been generated with image-assist module.

What it does is that it looks for an additional 'small_' prefix name so that if from within imce file uploader you ask for generation of 'small' thumbnails, then this thumbnail will be used if no thumbnail with 'thumb_' prefix was found.
(note: you can add your own prefix to $thumb_prefixes array)

If no thumbnail was found using 'small_' prefix, then it tries to find thumbnails generated with image-assists (those using '.thumbnail.' naming convention).

I hope it helps.
Regards,
Remy