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

Home Forums Support [Resolved] Change media.php to have all featured images same height/width

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

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1049997
    Heather

    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?

    #1050008
    Leo
    Staff
    Customer Support

    Hi there,

    Have you tried using the customizer options?
    https://docs.generatepress.com/article/adjusting-the-featured-images/

    Let me know ๐Ÿ™‚

    #1050646
    Heather

    That seemed to work great, thank you!

    #1050720
    Leo
    Staff
    Customer Support

    No problem ๐Ÿ™‚

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.