[Resolved] Problem in resizing featured images

Home Forums Support [Resolved] Problem in resizing featured images

Home Forums Support Problem in resizing featured images

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1269601
    Lucas

    Good night, I have a problem resizing the featured images of the blog.

    On the “Media” page in WordPress Settings, the size of the thumbnails is set to 300×300, however they are being displayed twice as large in the featured images of the posts.

    On the home page the featured images appear at 300×300 (or something), however when you open them with the right mouse button they show their true size: above 600x wide.

    I was able to observe a strange detail: when I reduce the size of the thumbnails in “Media” to 150×150, the featured images start to be displayed in true size 300×300, instead of just being resized via CSS as before.

    #1269697
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    I think this is srcset doing its job.

    If you right-click the image and “Inspect”, you’ll see srcset is listing out quite a few image sizes depending on the screen size.

    #1270324
    Lucas

    So how do I load featured images with only 300px regardless of resolution?

    #1270949
    Tom
    Lead Developer
    Lead Developer

    You could disable srcset: add_filter( 'wp_calculate_image_srcset', '__return_false' );

    #1270954
    Lucas

    Thank you very much, it really worked.

    #1271282
    Tom
    Lead Developer
    Lead Developer

    You’re welcome 🙂

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