Here is how i reproduce it:
1. Access an uncached image directly from the browser.
2. The image cache will be generated correctly on the server. (file No.1)
But nothing will be shown in the browser.
The actual content served will be something different. (file No.2)
3. Download both files and compare them.
file No.1 has a file header of "FF D8 FF E0 00 10 4A 46 49 46" which is a correct one.
file No.2 has a file header of "EF BB BF FF D8 FF E0 00 10 4A 46 49 46"
BOM header is added to file No.2 so the browser don't know how to handle it.
4. Since a wrong file(file No.2) is saved locally, the image will not be displayed afterwards.
5. Force refresh the browser. The correct image will show up.(file No.1)

So it seems that during the first-time generation of imagecache, the users will be served with images with wrong header(BOM header incorrectly added). And then the users will need a force-refresh in order to see the correct cache files on the server.


mathieu’s picture

I'm having a similar issue, but with image_captcha. I guess this means it's not Image Cache related, but perhaps has more to do with the server. Investigating...

EDIT: turns out the issue was that someone had saved a module file with a BOM. Probably using notepad... :-( Anyone with this issue can run the snippet found on to find out the culprit.

mathieu’s picture

Issue summary: View changes