PrestaShop Images

自闭症网瘾萝莉.ら 提交于 2019-12-07 06:11:15

问题


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

How can you keep the image extension?


回答1:


At Back Office > Preferences > 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 the images are in JPEG (PNG are converted), so you can either choose to use the 2nd option (to not convert images) or the 3rd option - to convert the JPEG images to PNG.




回答2:


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




回答3:


After changing the image pref in the CMS it should work. The images will still show as jpg but will keep the transparency properties of a png.



来源:https://stackoverflow.com/questions/26279192/prestashop-images

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!