Answer the question
In order to leave comments, you need to log in
How to resize a WP post (product) image?
Good afternoon. For the product, I set the image of the product, the file is automatically cropped to 300x300. I need to make the proportions wider. Specifically 510x510. However, there are pictures that are not proportional, for example 9:2. I don't want them to be cut off. How to implement it?
I tried to write in function add_image_size( 'my_cart_image_size', 510, 510, false );
But it didn't work. Or maybe I'm doing something wrong.
Answer the question
In order to leave comments, you need to log in
If you have WooCommerce, then through the Design Settings -> WooCommerce-> Product Image
And if what is there does not suit you, then dig in the direction of how Opencart does it, because I remember that it simply created a thumbnail of the right size with a white background and contained a photo there without pruning.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question