Keep aspect ratio/proportion of images
-
Hi,
There are two areas of the theme I using (a header feature and a more posts feature) that displays images from my posts, and changes not only the size, but also the ratio of my images.
I understand that images need to be scaled, but when the ratio/proportions get changed as well, the result is not always what I had in mind. My images are all 2:3, so 800 x 1200, for example. When I View Image Info for an image on my site, it says: 1,200px × 654px (scaled to 920px × 501px).
Theme support has told to change this area of code, but nothing I do has any effect – any ideas?
/************************************** IMAGE SIZES ***************************************/ add_image_size( 'post_component_carousel_thumb', 1005, 519, true); // 1.94:1 add_image_size( 'block_grid_thumb_6_layout', 1005, 519, true); // 1.94:1 add_image_size( 'block_grid_thumb_3_layout', 1267, 654, true); // 1.94:1 add_image_size( 'block_carousel', 970, 546, true); // 1.77:1 add_image_size( 'even_grid_thumb_x2', 970, 546, true); // 1.77:1 //set general content width if (!isset($content_width)) $content_width = 1005;
This is my site url https://www.planticize.com
Thanks!
- The topic ‘Keep aspect ratio/proportion of images’ is closed to new replies.