PrestaShop Images

I have Prestashop 1.4.9.0 installed with my PHP project. When I add a new product, I download the image in PNG format, but when it is displayed on the client side, the image is in JPG format.

How to save image extension?

+5
source share
3 answers

In Back Office> Settings> Images, you have 3 options for "Image Quality":

  • Use jpeg
  • Use PNG only if the base image is in PNG format
  • Use PNG for all images.

By default, all images in JPEG format (PNG are converted), so you can either choose option 2 (so as not to convert the images), or the third option is to convert JPEG images to PNG.

+7
source

If you try the first answer (in Back Office> Preferences> Images you have 3 options for "Image Quality" :), this mast works, but you will see a .jpg image extension. But if you look at the image code, it will be png. If you need different extensions, you need to change core and .htaccess.

+2
source

After changing the pref image in the CMS, it should work. Images will be displayed as jpg, but retain the transparency properties png.

+1
source

Source: https://habr.com/ru/post/1204330/


All Articles