[Skip to main content](#vessel-content)

#   Error when adding images to product and category

##

- **[blade19941](/forum/user/1105-blade19941 "View blade19941's Profile")**
- [![blade19941's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1105-blade19941 "View blade19941's Profile") Topic Author
- [ Offline](/forum/user/1105-blade19941)

Less More

- Posts: 21
- Thank you received: 0
-
-

15 years 9 months ago [\#9442](#9442) by [blade19941](/forum/user/1105-blade19941 "View blade19941's Profile")  *[Error when adding images to product and category](/forum/4-how-to/9442-error-when-adding-images-to-product-and-category#9442 "PHP Warning: imagecreatefromjpeg() &#91;function.imagecreatefromjpeg&#93;: gd-jpeg: JPEG library reports unrecoverable error: in E:&#92;web&#92;soundrsa&#92;administrator&#92;components&#92;com&#95;hikashop&#92;helpers&#92;image.php on line 306 PHP Warning: imagecreatefromjpeg() &#91;function.imagecreatefromjpeg&#93;: 'E:&#92;web&#92;soundrsa&#92;media&#92;com&#95;hikashop&#92;upload&#92;pioneer&#95;cdj-2000&#95;dj&#95;cd&#95;deck&#95;angle&#95;medium.jpg' is not a valid JPEG file in E:&#92;web&#92;soundrsa&#92;administrator&#92;components&#92;com&#95;hikashop&#92;helpers&#92;image.php on line 306 PHP Warning: imagecopyresampled() expects parameter 2 to be resource, boolean given in E:&#92;web&#92;soundrsa&#92;administrator&#92;components&#92;com&#95;hikashop&#92;helpers&#92;image.php on line 261 PHP Warning: imagedestroy() expects parameter 1 to be resource, boolean given in E:&#92;web&#92;soundrsa&#92;administrator&#92;components&#92;com&#95;hikashop&#92;helpers&#92;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?")* was created by *[blade19941](/forum/user/1105-blade19941 "View blade19941's Profile")*

PHP Warning: imagecreatefromjpeg() [&lt;a href='function.imagecreatefromjpeg'&gt;function.imagecreatefromjpeg&lt;/a&gt;]: gd-jpeg: JPEG library reports unrecoverable error: in E:\web\soundrsa\administrator\components\com_hikashop\helpers\image.php on line 306
PHP Warning: imagecreatefromjpeg() [&lt;a href='function.imagecreatefromjpeg'&gt;function.imagecreatefromjpeg&lt;/a&gt;]: '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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzk0NDItZXJyb3Itd2hlbi1hZGRpbmctaW1hZ2VzLXRvLXByb2R1Y3QtYW5kLWNhdGVnb3J5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

15 years 9 months ago [\#9445](#9445) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Error when adding images to product and category](/forum/4-how-to/9442-error-when-adding-images-to-product-and-category#9445 "PHP Warning: imagecreatefromjpeg() &#91;function.imagecreatefromjpeg&#93;: gd-jpeg: JPEG library reports unrecoverable error: in E:&#92;web&#92;soundrsa&#92;administrator&#92;components&#92;com&#95;hikashop&#92;helpers&#92;image.php on line 306 PHP Warning: imagecreatefromjpeg() &#91;function.imagecreatefromjpeg&#93;: 'E:&#92;web&#92;soundrsa&#92;media&#92;com&#95;hikashop&#92;upload&#92;pioneer&#95;cdj-2000&#95;dj&#95;cd&#95;deck&#95;angle&#95;medium.jpg' is not a valid JPEG file in E:&#92;web&#92;soundrsa&#92;administrator&#92;components&#92;com&#95;hikashop&#92;helpers&#92;image.php on line 306 PHP Warning: imagecopyresampled() expects parameter 2 to be resource, boolean given in E:&#92;web&#92;soundrsa&#92;administrator&#92;components&#92;com&#95;hikashop&#92;helpers&#92;image.php on line 261 PHP Warning: imagedestroy() expects parameter 1 to be resource, boolean given in E:&#92;web&#92;soundrsa&#92;administrator&#92;components&#92;com&#95;hikashop&#92;helpers&#92;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?")*

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). =&gt; 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. =&gt; 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. =&gt; [ bugs.php.net/bug.php?id=29878](http://bugs.php.net/bug.php?id=29878) you need to update PHP
4. the wrong jpeg library is used on your server =&gt; [ bugs.php.net/bug.php?id=50125](http://bugs.php.net/bug.php?id=50125) follow the recommendations there
5. you can also try to deactivate GD's warnings =&gt; [ bugs.php.net/bug.php?id=39918](http://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 ![:/](/irritated.gif ":/")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzk0NDItZXJyb3Itd2hlbi1hZGRpbmctaW1hZ2VzLXRvLXByb2R1Y3QtYW5kLWNhdGVnb3J5P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.054 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
