Error when adding images to product and category

  • Posts: 21
  • Thank you received: 0
13 years 8 months ago #9442

PHP Warning: imagecreatefromjpeg() [<a href='function.imagecreatefromjpeg'>function.imagecreatefromjpeg</a>]: gd-jpeg: JPEG library reports unrecoverable error: in E:\web\soundrsa\administrator\components\com_hikashop\helpers\image.php on line 306
PHP Warning: imagecreatefromjpeg() [<a href='function.imagecreatefromjpeg'>function.imagecreatefromjpeg</a>]: 'E:\web\soundrsa\media\com_hikashop\upload\pioneer_cdj-2000_dj_cd_deck_angle_medium.jpg' is not a valid JPEG file in E:\web\soundrsa\administrator\components\com_hikashop\helpers\image.php on line 306
PHP Warning: imagecopyresampled() expects parameter 2 to be resource, boolean given in E:\web\soundrsa\administrator\components\com_hikashop\helpers\image.php on line 261
PHP Warning: imagedestroy() expects parameter 1 to be resource, boolean given in E:\web\soundrsa\administrator\components\com_hikashop\helpers\image.php on line 295

That is the error that i get when i try to add a picture to a product or category.
How do i fix this?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 8 months ago #9445

This is not a problem in HikaShop.

There are a lot of cases when that can happen:
1. your image is not really a jpg image (like for example if it's a gif and the file extension was renamed to jpg). => correct the extension of your file
2. your image was saved in CMYK format instead of RGB. That can produce problems with some versions of the GD library of PHP which HikaShop uses to resize the images. => save your image in RGB format
3. you use php 5.1.3 or a previous version of php 5. There was a bug in some cases in the way the GD library was used by PHP. => bugs.php.net/bug.php?id=29878 you need to update PHP
4. the wrong jpeg library is used on your server => bugs.php.net/bug.php?id=50125 follow the recommendations there
5. you can also try to deactivate GD's warnings => bugs.php.net/bug.php?id=39918
6. As a last resort, you can disable thumbnails in the config of HikaShop under the tab files. That way, HikaShop won't create thumbnails for your images.

In any case, there is nothing we can do on our end to help you and you will have the same problem with any PHP application on your server if you try to resize that image :/

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

Time to create page: 0.058 seconds
Powered by Kunena Forum