• Hi, so the problem I’m currently encountering is that I have a list of posts to display, using wp’s built in query loop block, for which I want to use a Medium resolution version of their featured image, which I already ensured gets generated correctly when I upload media files to my WordPress site. The problem is that, despite the editor showing the Medium resolution as the selected value for my featured post image resolution, the public site is displaying the full-sized image.

    I’ve investigated, and I see that my image is being generated with the right asset for its src attribute:
    src="https://site.com/it/wp-content/uploads/image-500x283.jpg" , but then a srcset attribute is also generated for it, which also includes higher resolution versions for the same image to show on larger viewports, which is an unwanted behaviour as I’m always sure the image will never be shown in blocks larger than a given amount of pixels. Is this a behaviour built into the theme, or should I look for support elsewhere?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator janmtm

    (@janmtm)

    Hi @ac22mfm !

    The Post Featured Image Block inside the Query Loop Block uses an aspect ratio, and so maintains responsiveness across various device sizes.

    Post Featured Image block

    You could possibly force the Block to stay within a specific and minimum height and/or width by using the Height and Width settings beneath ‘Aspect Ratio’ in the Block settings. Note, though, that upon doing this, unless you’re using pixels (px) and not %, em, rem, vw or vh, you may be back at the start since px will not give you responsiveness for the image once the device size is different.

    Can you share some more context on the settings you have set up exactly, so far ?

    Look forward to hearing back from you!

    Thread Starter ac22mfm

    (@ac22mfm)

    Hey, thanks for your answer. I think you misunderstood my statement, though. I’m talking about the image containing higher resolutions in its sourceset than the one I’ve specified, not the image element appearing in the DOM with the wrong size.

    Moderator janmtm

    (@janmtm)

    Hi @ac22mfm ,

    Got it. Can you share the exact code snippet that you’re asking about, so that it’s clearer what you’re having an issue with ?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Wrong resolution being rendered’ is closed to new replies.