Okay
  Public Ticket #1029140
Featured Image Issues
Closed

Comments

  •  2
    calvinseng started the conversation

    Hi,

    Strangely, even though my featured image pixels are 300px x 300px, the widget automatically fetches 300 x 240px and crop off instead of showing the whole thing. I tried regen. thumbnails and set the media sizes at the settings but to-no-avail. Can you recommend a method to show 300px x 300px or 240px x 240px, basically 100% width and height automatically?
    Thanks.

  •  1,710
    Barry replied

    Hi Calvinseng,

    To let the images being cropped on a custom size you need to change the add_image_size() function in the funtions.php file. I recommend to install the child theme for this and then add the custom add_image_size() functions in the child theme functions.php file so your changes won't be overwritten when updating the theme.

    You can add this in to the child theme functions.php file:

    function child_theme_setup() {
        add_image_size( 'physio-qt-featured-l', 850, 850, true );
        add_image_size( 'physio-qt-featured-s', 300, 300, true );
    }
    add_action( 'after_setup_theme', 'child_theme_setup', 11 );
    

    After adding the code you need to run the Regenerate Thumbnails plugin again.

    Now the images on desktop are resized in 300x300 pixels. But the width and height of it depends on how wide the columns of the page builder is where the 'QT: Featured Widget' is added to.

    If you have any questions, feel free to ask

    Best regards,
    Barry
    QreativeThemes.com  |  WordPress Themes