some images are not displaying

  • Posts: 130
  • Thank you received: 1
12 years 8 months ago #41310

Hi,

I am having problem with some of the images linking after my latest csv import. This is example of error that I am getting when I display the product page with problematic image:

Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg: JPEG library reports unrecoverable error: in /home/karolko/public_html/administrator/components/com_hikashop/helpers/image.php on line 372

Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: '/home/karolko/public_html/media/com_hikashop/upload/WGP-SWO-01.jpg' is not a valid JPEG file in /home/karolko/public_html/administrator/components/com_hikashop/helpers/image.php on line 372

Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /home/karolko/public_html/administrator/components/com_hikashop/helpers/image.php on line 327

Warning: imagedestroy(): supplied argument is not a valid Image resource in /home/karolko/public_html/administrator/components/com_hikashop/helpers/image.php on line 361

Notes:

  • about 20% of my latest imported images are affected (i did import of about 300 new images)
  • I can open / display images that hikashop considers invalid just fine via file manager of my provider or via browser link, say www.mephit.cz/media/com_hikashop/upload/WGP-SWO-01.jpg
  • after I reload page when the error is displayed, blank blank image is displayed instead and the errors are no longer shown, an example:

www.mephit.cz/cs/historicke-miniatury/pi...-years-war-swordsmen

Thanks,

Karol

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 8 months ago #41459

Hi,

That's not HikaShop which considers the image as invalid but the GD library of PHP which HikaShop uses for images resize.

Looking around, you could try the fix proposed here:
bugs.php.net/bug.php?id=29878

ie add the code:

ini_set('gd.jpeg_ignore_warning', 1);

before the code:
return ImageCreateFromJPEG($image);

in the file administrator/components/com_hikashop/helpers/image.php

Or it could be a problem with the jpeg library installed on the server:
bugs.php.net/bug.php?id=50125

Please Log in or Create an account to join the conversation.

Time to create page: 0.041 seconds
Powered by Kunena Forum