Jump to content

Uploading Photos


horns

Recommended Posts

Hi,

Can anyone help me sort out how to upload category and product photos. It seems at the moment no one can tell me how to do it. When I upload photos all I get in FO is a box with a red x in place of the photo. Any help to solve this problem appreciated. I have been trying for a whole week with no help from the forum for some reason.

Regards
Paul

Link to comment
Share on other sites

Hello

If you upload a category image
prestashop resizes the image and saves it in several sizes in the
folder .../img/c
the name of the picture starts with i think the product id or the product name followed by small/medium/thumb... and .jpg

The produktimage will also be resized but saved in the folder .../img/p
The imagename consists of i think the product id or the produkt name and a - AND a number
that is stored in the mysql table and small/medium/thumb... .jpg
If you have uploaded 215 produktimages through the adminproduktpage the next uploaded
image will get the number 216 in the imagename.
This number in the productimagename takes in count that there could be several images for one product -
an imagename has to be unique.

The original uploaded picture will also be renamed and stored in these folders.
Your uploaded image with the imagename you gave it will be renamed and stored on the server.
Prestashop knows only the renamed image.
That means that if you hit the regenerate thumbnails button in the admin->preferences->image panel
prestashop takes the renamed original size image and regenerates the thumbnails from this image.

Conclusion:
There is no "easy" way to upload the product/category images.

If you have only a few images to upload than try to download the
.../img/c and the .../img/p folder,
overwrite the images that need to be changed and upload them back.

For my shop has the same images for the product and the category
and there will be no second or third productimage
and the category and the product have the same id
http://www.koenigsbanner.de
i have patched the prestashop code to take the same pictures
for category and product and dont use the extra number in the name.
Then i upload my original images in an extra folder and convert them with an extra php script and
an csv database file telling the original jpg name and the name/productid/categoryid for the converted image file.

That sounds complicated - every shop / shopowner / shopcoder has his/her own thoughts about the best
conclusions for a shop.

So tell us your idea for imagehandling for pretashop.

Friedbert

Link to comment
Share on other sites

  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...