Site logo

Archived topic

Featured image size and srcset

5 replies · Started by Philip on August 18, 2022

Viewing posts 1–6 of 6

Hi Guys,

I'm seeing some unexpected (but probably normal) behavior with featured image sizes and would appreciate your opinion.

In GeneratePress Customize/Layout/Blog/Featured Images (archives and posts), I've set the Media Attachment Size to medium (900px wide, as defined in WP Media settings).

In Chrome on M1 iMac with Retina display, the Inspector shows that the correct featured image srcset loads, but the displayed image size is full (2048px wide).

If I drag the same Chrome window to my attached non-Retina monitor, the displayed image is of the specified medium size (900px wide).

The same behavior occurs with Safari on M1 iMac.

Are these observations consistent with your understanding of how srcset works?

Thanks.

Phil

-----

Host: WP Engine
Server: Nginx
PHP: 8.0.20
WordPress: 6.0.1
GeneratePress theme: 3.1.3 with starter child theme
GP Premium: 2.1.2
GenerateBlocks Pro: 1.3.0

Hi Phil,

Can you link us to your site where we can see the featured image?

Sure. See private information.

I checked the site on my Mac, and it's grabbing the 2048px width image.

It's normal behavior, as Retina always tries to grab an image that has x2 pixels if it is available.

The image size is rendered as 900px in normal screen, so Retina will try to find the image around 1800px, in this case, it's 2048px.

If Retina doesn't do this, the images will look blurry.

Understood. That's what I suspected.

Thanks very much for checking.

Phil

You are welcome :)

This archived topic is closed to new replies.