• Resolved psiteco

    (@psiteco)


    Hi,

    I’m using a Query Loop block to show a grid of blog posts. The layout is perfect, but it loads quite slow because for each post the full size featured image of ~2 MB is loaded. Looking at the code, it seems to be able to scale the image down.

    <figure class="wp-block-post-featured-image">
    <a href="link page">
    <img width="2000" height="1333" src="full-image.jpg"
    class="attachment-post-thumbnail size-post-thumbnail wp-post-image" loading="lazy" srcset="full-image.jpg 2000w, image-900x600.jpg 900w, image-1536x1024.jpg 1536w"
    sizes="(max-width: 2000px) 100vw, 2000px" /></a></figure>

    Whatever I try in the WordPress editor or with custom css, the image size remains 2000×1333. Do you have any idea how I can make the Post Featured Image block use a smaller size image?

    Thanks

    • This topic was modified 2 years, 9 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Loading small images in Post Featured Image block’ is closed to new replies.