[Resolved] “Displays images with inappropriate size” in Google Web Dev results

Home Forums Support [Resolved] “Displays images with inappropriate size” in Google Web Dev results

Home Forums Support “Displays images with inappropriate size” in Google Web Dev results

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #1326139
    Michael

    Hello all,

    In Google Web Dev I’m getting warnings about featured images being the wrong size eg:

    https://www.dropbox.com/s/zc5622zkww2qw0i/featured-image-inappropriate-size.jpg?dl=0

    I can’t work out where any of these sizes are coming from. I’ve uploaded the featured image as 750 x 422, and in my media settings thumbnails are set as:

    https://www.dropbox.com/s/v7qp7fmn7ze65id/media-settings-image-sizes.jpg?dl=0

    I thought the idea was that the media library thumbnails were used to serve the images responsively? If I inspect the element I see:

    https://www.dropbox.com/s/iul5a1dc1pyyk2c/featured-image-inspect-element.jpg?dl=0

    I’m not setting this vw code, so wanted to ask if the theme is doing this? And if so how I can set the images to appease Google and avoid the warning in web dev?

    Please can you tell me what I’m missing or point me in the direction of a relevant article that answers the question (I haven’t been able to find any specific to this issue).

    Many thanks for your help.

    Michael.

    #1326518
    Michael

    I asked about this on the wordpress forum also and someone replied with:

    Well, no the media library does not manage the responsiveness. The theme does.
    However, your image is correct in rendering the 750px :
    https://imgur.com/a/v3jiBUB

    But the theme is rendering at 750px when in small mode :
    https://imgur.com/a/MR8B3q1

    #1326559
    Tom
    Lead Developer
    Lead Developer

    While I’m sure a theme could set the sizes, we don’t. We simply use the_post_thumbnail(), which is a core WordPress function that outputs the featured image.

    Are you wanting to adjust the values in srcset?

    If so, this might help: https://wordpress.stackexchange.com/questions/287522/understanding-wordpress-image-sizes-and-responsive-images

    #1326827
    Michael

    Hi Tom, I got it to finally work by setting the width and height for featured image in customizer under layout \ blog and then resized my images that didn’t fit this to the correct size and reuploaded. Then when testing in web dev the warnings about size were gone.

    #1326832
    Michael

    Scratch that….. Worked fine on desktop, but when checked on mobile just now not as much….

    #1327585
    Tom
    Lead Developer
    Lead Developer

    As long as your images are optimized and sized correctly (not too big, not too small), I wouldn’t worry about it that much.

    I just tested your site in Insights and Lighthouse and didn’t see the above issue.

    #1327689
    Michael

    Thank you Tom 🙂 I removed the featured images from showing up on individual blog posts and that helped. They only show on the blog page itself now

    #1327915
    Tom
    Lead Developer
    Lead Developer

    If you want to re-add them I can take another quick look at the HTML 🙂

    #1328198
    Michael

    Hi Tom,

    Thank you very much 🙂 The issue is still visible on the blog page itself (under Best Practices result here):

    https://lighthouse-dot-webdotdevsite.appspot.com//lh/html?url=https%3A%2F%2Freclaimdesign.org%2Feco-blog%3Fao_noptimize%3D1#best-practices

    #1328902
    Tom
    Lead Developer
    Lead Developer

    I’m not really seeing anything wrong with that image.

    You could try disabling srcset to see if it’s the cause: https://wordpress.stackexchange.com/a/211985/90661

    #1329104
    Michael

    Thanks for checking Tom. I don’t see anything wrong with it either – bloody Google 😉

    #1329168
    Tom
    Lead Developer
    Lead Developer

    No problem. Will keep this topic in mind in case I end up finding a solution 🙂

    #1329173
    Michael

    Thanks Tom – I appreciate it!

    #1353168
    frankie

    try his in your custom css :
    .featured-image img {
    object-fit: contain;
    }

    that work for me 🙂

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