Topic: Full Screen image | WP Masonry Layout

Full Screen image

Home Forums Pro Version Full Screen image

This topic contains 3 replies, has 2 voices, and was last updated by  Masonry Guy 2 years, 4 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #710 Reply

    Oladapo Onikuyide

    Accidentally posted in the Lite Forum even though I’m running premium: I was wondering how i could take those featured images that show up in the ‘Default’ theme and and have them fill the width/top portion of the boxes. They show up right now as medium attachments, and I want to know what controls that.

    #711 Reply

    Masonry Guy
    Keymaster

    Hi Oladapo,

    Can you please post the url here ?

    Thanks

    #713 Reply

    Oladapo Onikuyide

    My site is on a local server stored on my hard drive. But here is a screen grab of one of the images http://imgur.com/EYOey9o, whenever I cane the setting from medium to large, I get this http://imgur.com/C5hLxyW

    #714 Reply

    Masonry Guy
    Keymaster

    Hi Oladapo,

    The stretch image us caused by wordpress forcing height/width in your image. You can keep this in your functions.php to fix it.

    function remove_img_attr ($html) {
        return preg_replace('/(width|height)="\d+"\s/', "", $html);
    }
    
    add_filter( 'post_thumbnail_html', 'remove_img_attr' );

    Thanks

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Full Screen image
Your information: