RetconHTML-Craft
RetconHTML-Craft copied to clipboard
ImagickException: improper image header
When I have 'Use Imager for image transforms' option checked I get an error when displaying a image from a Wysiwyg field. The error on screen is:
'Unable to open image /home/wjelsma/domains/weeges.nl/public_html/craft/storage/runtime/imager/weeges_nl/images_src/inhoud/testimage.png'. I've checked the filesystem, the image does exists. I can not confirm that the image is not corrupted, but I tried several images and I it seems very unlikely that they're all corrupted.
When taking a look inside Craft log files I see the following appear:
'ImagickException: improper image header `/home/wjelsma/domains/weeges.nl/public_html/craft/storage/runtime/imager/weeges_nl/images_src/inhoud/testimage.png' @ error/png.c/ReadPNGImage/3741 in /home/wjelsma/domains/weeges.nl/public_html/craft/app/vendor/pixelandtonic/imagine/lib/Imagine/Imagick/Imagine.php:54'
I have Imager plugin installed. When displaying the image just using Imager I don't see any errors.
This is the template code I use to display the image from the wysiwyg field.
{{ entry.body |
retconSrcset([
{width: 300},
{width: 320},
{width: 600},
{width: 640},
{width: 1024},
{width: 2048}
],
'(max-width: 640px) 100vw, 1024px' )
}}
Any idea?