Insert module doesn't work with imagecache presets. During inserting of image, the html code inserts correctly, however the image doesn't show up. The reason for it is that the imagecache image is not created. The code inserted looks correctly:

<img alt="" class="imagecache-Medium" src="http://example.com/sites/default/files/imagecache/Medium/image.jpg" title="" />

but if you navigate to sites/default/files/imagecache/Medium you'll see there is no image.jpg file.

The environment set was:
- cck 6.x-2.6
- filefield 6.x-2.6
- imagefield 6.x-3.2
- insert 6.x-1.0-beta2
- imagecache 6.x-2.0-beta10
- image_resize_filter 6.x-1.6

I was able to reproduce this error in Different Drupal installations. Also few different wysiwyg modules. Always the same problem.

We've seen it working - for ex. here: http://mustardseedmedia.com/podcast/episode29

Why it's not working now?

Comments

srobert72’s picture

I think the problem is just your image isn't called by editor. But it will appear if you save node and test it normally.
I've seen same problem with new image not already transform by imagecache.
But if your try another one with its preset not empty then it works.
I suppose podcast demo as been done in this case.

Could you confirm ?

quicksketch’s picture

Category: bug » support
Status: Active » Closed (fixed)

Insert module is not responsible for actually generating the ImageCache images. If the inserted code looks correct then Insert has done it's job correctly. If you can't visit that URL directly and have the image show up then it sounds like a problem with your ImageCache configuration or server.

giorgosk’s picture

take a look at this similar issue and solution #622630: Some themes won't let image insert

grimer’s picture

I also have this problem. I have created a couple of imagecache presets for users to insert images - 'portrait' and 'landscape'.

When I upload an image, I can view a thumbnail. When I click 'insert', no image is inserted into the body text field. However, when I select 'automatic' or 'original' as insert styles, the image is inserted correctly.

This is the code produced when inserting the imagecache preset:

<img class="imagecache-landscape" alt="">

This is the code produced when inserting 'automatic'

<img src="http://edu-websites.com/larmenier-prototype/sites/default/files/post_images/model2_0.jpg" alt="" height="201" width="278">

It seems that the insert module is not interfacing with the imagecache module.

This function did used to work on my site, but seems to have broken at some point. Does anybody have any ideas?

Setup:

Drupal 6.16
Insert 6.x-1.0-beta4
ImageCache 6.x-2.0-beta10
Modified Zero Point Theme (tested with Garland and experiencing same problem)