Jump to content

Uploading Product Images Gives 1 of 2 Error Messages


Recommended Posts

Hi All..  This topic has come up before, but sifting through all related posts does not help me.

 

I did a clean install of 1.5.6.1 on my windows xp machine using mysql and wamp.. created like 3,000 test products and images all worked fine loading for each product.

 

I then installed 1.5.6.1 on my hosted web site using ipage.com as my hosting provider.  The install went clean and I was setting up everything properly without any problems.

 

When I got to the point of uploading the exact same images that I used during my testing for my products, I get 1 of 2 error messages:

 

"An error occurred while copying the image."   which shows a broken piece of paper icon image. 

 

or 

 

"undefined"  which doesn't show any icon image.

 

I talked to my ISP and they said to ask you guys first and see ask where does prestashop log the detailed error messages as the 'Logs" menu under "Advanced Parameters" does not log the errors of this problem...  If there is something that I need to change in the menu options let me know.. better yet, what is the solution to this problem if people know off the top of your head.

 

With my ISP we have already tried granting '777' permission to the "IMG" folder and tried 3 different browsers but the same problem.  My jpg images are not that big and are not high resolution.. they were specifically created to support shopping cart web sites and web sites in general, so i'm at a loss why the problems.

 

Thanks

Tom

Link to comment
Share on other sites

Hi All..

 

Just to give you a little update my investigative research on this topic.  Last night I sorted my images by file size and attempted to import my product images manually from the biggest to the smallest...  

I noticed that any of my product images that are EXACTLY 1MB in size or higher will result in one of the 2 error messages, and any product image files sizes are less than 1MB will import without any problems.

 

So the million dollar question with my setup or the PrestaShop software is where can I configure it to allow product images that their file size is =< 1MB to be imported?

Link to comment
Share on other sites

Here is the answer to your milllion dollar question. You cannot set the product image size in the prestashop admin panel.

 

You will have to go to (assuming your prefix is ps_) ps_configuration table and search for PS_PRODUCT_PICTURE_MAX_SIZE in the name column and you will find its value. That is the value used to set the maximum upload size of the product images.

Link to comment
Share on other sites

I see the value in that field.. it is set to '8388608'... not sure what the conversion from 1MB to '8388608' is?  If I simply double the number then will it then be set to the equivalent to 2MB or triple the number then it will be set to the equivalent to 3MB etc etc?

 

If the value in this field is the root cause of my error message.. Why is the error message so cryptic if the file size is higher than the set value?  One would figure that a proper error message would be something like "The File Size Of your Image Is Greater Than <x>MB.  Please either reduce the file size or change the default value in the configuration table for field PS_PRODUCT_PICTURE_MAX_SIZE".

Link to comment
Share on other sites

with the help of my hosting support department, I ran the phpinfo and verified that the upload_max_filesize is set for 20MB... any other places to look at ?  

 

Only additional info my hosting support stated is that if the file doesn't upload within 60 seconds it times out.. but I have a super fast connection so I know its not a time out problem.

Link to comment
Share on other sites

I think I fixed my problem..  For whatever reason if I open the JPG files using Microsoft Paint and simply re-save them without any modification (File->Save) and close down Microsoft Paint, I notice the file size drops dramatically and then it will allow me to upload the image to my product records without any error message..

 

So far I am up to 20 JPG files that have been giving me grief and with this technique, the images now import fine!!!

Link to comment
Share on other sites

and if re-saving the jpg file doesn't work for you... Using Microsoft Paint, click on the 're-size' option and select "by pixel" and change the value for the 'horizontal' to 1500 which it should automatically change the 'vertical' value for you.  Once make the change, save the image and you will see how much smaller the size of the file will be, but still clear.. and you should be able to import it into your product record.

Link to comment
Share on other sites

  • 1 month later...

3 questions:

 

1. file format of the image(s)

2. if you open one of those graphic files in paint or any graphic program.. what is the horizontal and vertical sizes in PIXELS

3. if you look at one of the those graphic files.. what is the file size of them?

Link to comment
Share on other sites

×
×
  • Create New...