Multiple image sizes (responsive images) for YARPP thumbnails
-
Hi,
I’m a long time user of YARPP, using the thumbnails version. I have YARPP thumbnails showing well on my homepage and in the sidebar of every page.
In my theme
functions.php
, I haveadd_image_size('yarpp-thumbnail', 309, 178, true);
which generates thumbnails sizes showing properly on my site, when viewed on Desktop.However, when on mobile, the responsive layout makes the YARPP thumbnails take almost the whole viewport width. That’s great, but it means that a 309px wide thumbnail is now stretched to 540px wide, and it doesn’t look good.
Has anyone worked out a solution? As a workaround, I could generate all thumbnails to be 540px wide, but it’d also mean all Desktop visitors would download images heavier than neccessary.
Ideally, YARPP can generate different image sizes and use the
srcset
attribute to guide the browser on which JPG to download, but I’m hesitant to modify YARPP to make it so without breaking everything.Thanks for any advice
- The topic ‘Multiple image sizes (responsive images) for YARPP thumbnails’ is closed to new replies.