[Resolved] Correct image thumbnail size not used on mobile and iPad: larger image resized

Home Forums Support [Resolved] Correct image thumbnail size not used on mobile and iPad: larger image resized

Home Forums Support Correct image thumbnail size not used on mobile and iPad: larger image resized

Viewing 3 posts - 16 through 18 (of 18 total)
  • Author
    Posts
  • #1117657
    Tom
    Lead Developer
    Lead Developer

    Have you tried setting the image sizes in Customize > Layout > Blog? Those options will resize the image you upload.

    If you want to disable srcset on archives only, try this:

    add_action( 'wp', function() {
        if ( ! is_singular() ) {
            add_filter( 'wp_calculate_image_srcset', '__return_false' );
        }
    } );
    #1120630
    David

    Hello Tom,

    thank you very much.
    The second snippet works.

    I now consistently get small images on archive pages, and as far as I can see, srcset on individual posts.

    I understand that for individual posts it needs to serve a size that can satisfy both vertical and horizontal display.

    What still slightly confuses me is this:
    When srcset is active, a specific size is specified, the image is available in that size, then still a larger image is being served and resized to the specified size.

    If srcset works in this fashion, I think thumbnails/fixed-size images are best treated differently from normal post images.

    I guess these large magazine sites don’t use srcset to get the size down for all these preview images.

    And many thanks also to David for looking into this.

    Have a great day.

    #1121090
    Tom
    Lead Developer
    Lead Developer

    Glad it worked!

    I’m not a huge fan of srcset, it’s just something that WordPress implemented by default a couple of years ago. It makes sense for images in your content, but not so much for featured images (as we’ve found out here).

Viewing 3 posts - 16 through 18 (of 18 total)
  • You must be logged in to reply to this topic.