Site logo

Archived topic

Change media.php to have all featured images same height/width

3 replies · Started by Heather on October 31, 2019

Viewing posts 1–4 of 4

Hi,

I am noticing there are inconsistencies in height and width of the featured image in the blog archive pages - I know images should generally be uploaded to a similar width/height, but I would like to ensure that everytime a featured image is displayed on the site, primarily in the archive pages, it has dimensions of 390 x 200.

I tried added this width/height to various places within media.php with no luck, including adding values to this function:
function add_image_size( $name, $width = 0, $height = 0, $crop = false ) {
global $_wp_additional_image_sizes;

$_wp_additional_image_sizes[ $name ] = array(
'width' => absint( $width ),
'height' => absint( $height ),
'crop' => $crop,
);
}

Could you let me know what to target/change in order for this to happen?

That seemed to work great, thank you!

No problem :)

This archived topic is closed to new replies.