Jump to content

[SOLVED] Upload Zip file: ERROR: Image format not recognized, allowed formats are: .gif, .jpg, .png


Recommended Posts

Maybe I am beating a dead horse here.

I've spent weeks trying to find a solution with no success. Most fixes I have found are for pre-version 1.4.#.# which do not work at least for version 1.4.#.#.

 

For the first few months I was able to upload a Zip file containing images,all of a sudden a few weeks ago I am unable to do it any more.

 

Here is the error message I get when trying to upload a zip file containing images:

 

1 error

  • Image format not recognized, allowed formats are: .gif, .jpg, .png

The version I am using is 1.4.6.2 that started to get the error. After no luck trying to resolve this issue I installed the latest version 1.4.8.2 on another hosting account and I am still having this same error.

 

Could this be a server configuration issue since both versions are on the same hosting company (GreenGeeks) but on two very different accounts.

 

I know that a lot of people are also having this issue and hope someone from the Prestashop team can step up and look into this problem many people are having. Maybe have a list of the required server settings that must be activated for Prestashop to work optimally.

 

Thanks in advance.
Edited by joenmass (see edit history)
Link to comment
Share on other sites

In the product page where you upload your images. Where it says "You can also upload a ZIP file containing several images. Thumbnails will be resized automatically."

 

I used to be able to upload a zip file containing a few images but now for some reason I am unable to do it.

Link to comment
Share on other sites

Yea, I had read that thread before and many similar ones as well.

Unfortunately that thread was started in 2009 and the fix does not apply to version 1.4.#.#.

 

I too think its a server issue as well. I have contacted my hosting company GreenGeeks about this issue and I will post here if I get it resolved..... or not.

Link to comment
Share on other sites

I am pleased to say that I found the problem myself. :D

 

I had the same problem on two different versions(1.4.6.2 and 1.4.8.2) and the fix is the same except for the line number fix is different.

 

The problem I found is with the Prestashop script not playing nicely with my server settings.

 

I still believe this change was necessary because of a server upgrade that occurred from my hosting company (they did not find an issue with their server settings).

 

Why this fix has to be done, I don't know but it's the only way I got it to work.

 

Solution:

Go to your "admin" folder.

Open the "tabs" folder.

Choose to edit file AdminProducts.php

 

Now depending on what version you have....

 

Around line # 1033 for version 1.4.8.2, and around line #1025 for version 1.4.6.2)

Comment out or delete these lines:

 

if (!isPicture(array('tmp_name' => $subdir.$file, 'type' => $type)))
{
$image->delete();
throw new Exception(Tools::displayError('Image format not recognized, allowed formats are: .gif, .jpg, .png'));
} 

 

If you get a resizing error message then comment out or delete this line also (around line# 1037):

 

$image->delete();
 throw new Exception(Tools::displayError('An error occurred while resizing image.')
  )
 ;

 

That's it, after doing this I was then able to upload my zip files containing my product images.

 

I hope this will help those who has the same problem as I did. Please let others know if it worked for you as well.

Edited by joenmass (see edit history)
Link to comment
Share on other sites

  • 1 month later...

in the new version 1.4.9 i try upload a zip file but it's imposible i create zip file in the linux terminal: zip -r productB.zip *.png, never i had problems but in the new version i can't upload zip files.

 

regards!

 

Hello dan1t0

Will you please start a new topic regarding this issue that you're having seeing that it's the newest release of 1.4 that way everyone knows that there's an issue with this and isn't lost within this post

 

Thanks

Clayton

Link to comment
Share on other sites

  • 9 months later...
  • 1 year later...
  • 2 weeks later...
×
×
  • Create New...