Jump to content

[SOLVED] Prestashop image cropping background, change white color


Kerm

Recommended Posts

you have to change the height of the image under the preferences > images

image size defined there must be proportional to the sizes of the image that you're trying to upload

 

you can also change the image extension type (the same back office menu as above)

c3RBfaF.png

 

 

then all images will have transparent background

Link to comment
Share on other sites

Hello, thx for reply!

 

I already found the answer, need change in file images.inc.php function "imageCut", find this:

 

$white = imagecolorallocate($dest['ressource'], 255, 255, 255);

 

And change on this:

 

$white = imagecolorallocate($dest['ressource'], 42, 42, 42);

 

Where 42, 42, 42 is RGP color

 

PS.: I have in my shop product images with different aspect ratios so some images will be cropped anyway...

PS2.: I strongly recommend do not use option "Use PNG for all images", especially if u have alot product images, becose disk usage will increase up to 10 times...also same customers may experience difficulties when downloading these images with weak internet..

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

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...