exposeclothing Posted July 25, 2016 Share Posted July 25, 2016 Hello fellow prestashoppers, Im looking for advice on where i can change the colour of the image resize background. I understand prestashop automatically resizes images to the sizes specified in the backoffice, and will regenerate the images to this size, often within a white box. Like many others iv read in threads prior, i understand i COULD use PNG images so i can prevent the white box from appearing, but i wish to stick to Jpg due to file size (and other reasons)... As most of my images are various sizes, it seems time consuming to add each dimension to the image settings in the back office. I also would like it to change on the category thumbnails aswell. I see one person managed to change the "white background" by editing the css file for their selected theme, in the livethemeconfigurator files. I however have turned this module off, as i dont need it. Previous Prestashop version 1.5 i was able to find a module which allowed uses to customize the colour used to re-generate the images, and it worked great, however sadly it doesnt work on 1.6+ Have their been any new techniques come available since 1.6 came out, in regards to - product image background, - category thumbnail background (or image resizer background) Cheers Link to comment Share on other sites More sharing options...
rocky Posted July 25, 2016 Share Posted July 25, 2016 Try changing the following lines 246-247 of classes/ImageManager.php: $white = imagecolorallocate($dest_image, 255, 255, 255); imagefilledrectangle($dest_image, 0, 0, $dst_width, $dst_height, $white); For example, for black, change it to: $black = imagecolorallocate($dest_image, 0, 0, 0); imagefilledrectangle($dest_image, 0, 0, $dst_width, $dst_height, $black); Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now