Jump to content

prestashop error occurred while copying image (product page)


Recommended Posts

When trying to add more pictures to a product, I keep getting this error message:

prestashop error occurred while copying image

 

I tried to move the pictures to the new system, regenerate thumbnails, increase max picture sizes but nothing worked.

 

I have 6 pictures but really need 20 to be uploaded for this product. All pictures are under 1.4Mb.

 

I'm really not sure what to try next. This is the first time I get an error like this.

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...

This issue is (with error related to copying image) probably reported on forge and fixed, solution:
 

Open - Classes/Tools.php
 
Change line number 1408
 
From:
"return @copy($source, $destination, $stream_context);"
 
to:
"return @copy($source, $destination);"
 
It should work, it is a small bug in prestashop 1.5.5

Link to comment
Share on other sites

  • 2 weeks later...

I looked at some other threads about this to try to find a solution.  It's still not working and to confirm the steps I've done:

 

1.  changed line 1408 above

2.  php safe mode is off

3.  img directories all 755

 

I'm running 1.5.5.0

 

The specific error is:

 

"An error occurred while copying the image."

 

On the product image upload page.  This is a fresh install and I've not been able to upload any images on this page.  I can upload images anywhere else on the site as far as I can tell (categories, manufacturers, theme, etc.)

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

update - it looks like I can upload smaller images.  But the larger images are only 120kb.  I'll keep trying to rule things out to figure out what exactly is triggering the error.

 

 

Weird:

 

jpg (120-500kb) gives the error above

jpg smaller than 100kb successfully uploads

png says "undefined"

gif successfully uploads

 

I thought maybe the issue had to do with my bulk conversion on IrfanView of the images from png to jpg - but that doesn't seem to be the case.  I converted them manually by opening them in paint.net and then resaving them as jpg.  Still no luck on the jpgs.

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

hello

 

so the problem was related to image size that you tried to upload?

right?

 

Yep.  My machine was showing the sizes of the images to be much smaller than they were.  When I opened them in an image editor, the true size showed and I realized that was the issue.

 

Thanks!

Link to comment
Share on other sites

  • 3 months later...
  • 3 months later...

Hi all,

 

I had this problem too, and I think that the solution is very simple. Check the image dimensions, if the width is larger than 5000px, reduce to no more than 5000px, and then try to upload the image again.

 
It helped me, maybe someone will help too.
Sorry for my english, hopefully understand what I wrote  :)
Link to comment
Share on other sites

×
×
  • Create New...