System config
Imagecrop: 7.x-1.0-rc3+56-dev
Media: 7.x-2.0-unstable7+36-dev
Media Browser Plus: 7.x-2.0-dev1+4-dev
File Entity: 7.x-2.0-unstable7+50-dev
Chrome: 25.0.1364.172
OS: Windows 8 x64 AND Mac OSX 10.7
Issue
I was using an image style that uses imagecrop inside the body field of a node and Chrome on both Windows and Mac as well as Safari on Mac was just refusing to render the image. The "net" tab in their developer tools indicated that was waiting to be downloaded and it would just sit there like that, not downloading it.
At first I thought it was a problem with my file names as I'm developing on Windows and there were spaces and special characters in the file names. I cleaned up the file names and nothing happened... ran around in circles trying different things to no effect. It's a VERY weird glitch... The thing I was working on was JS related so that was the second thing I blamed but turning off JS didn't make the image load.
A colleague then mentioned that it might be a session issue and suggested that I try viewing the page in "incognito" mode in Chrome and lo-and-behold, the image showed up... which further confused matters...
After much more beating around the bush I tried changing the image effect applied in my image style and World of Wonders!... it worked. The thing that made me think of doing that was this issue on StackOverflow that mentions the use of ImageMagick causing weird glitches...: http://stackoverflow.com/questions/43525/images-not-displaying-in-webkit-based-browsers.
I'm not sure how helpful that link is and whether it fully applies here but I do know that the issue is caused by imagecrop module... Which is so very sad as I love this module and MUCH prefer to use it over image_focus module :o(
I haven't worked with the image extensions in PHP so can't be of further assistance but I really hope that using the system config above, someone who has the know-how can replicate/see the problem and nuke it!
Many thanks to the maintainers, you rock!
Cheers,
Anand :o)
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | imagecrop_workaround.jpg | 36.81 KB | anandkp |
Comments
Comment #1
anandkp commentedFollowup
Okay, so, I've found a good-enough workaround for now...
If you are experiencing the problem described above, what you can do is update the image style that uses Javascript Crop with another effect.
I installed SmartCrop module and added it as a second effect on the image style that I mentioned has Javascript Crop (imagecrop) enabled as an effect on it. I set the dimensions that SmartCrop crops the image to as the exact same as what I want Javascript Crop to do. See image below for a clearer picture (pun intended).
I'm guessing that on caching of image styles, since the SmartCrop is what's responsible for saving the image, whatever is going wrong that makes the image not load in Webkit browsers is rectified.
Hope this helps someone!!!
Comment #2
ianthomas_ukYou don't mention your version of Drupal core, but the other modules are relatively recent so I'm guessing 7.20+. If so, this sounds like a duplicate of https://drupal.org/node/1924078
Please reopen if you don't that this is the case.