Improve resolution of Hosted Content main media images#15600
Merged
Conversation
Jakeii
approved these changes
Mar 26, 2026
844a87f to
50fd5bb
Compare
cemms1
commented
Mar 26, 2026
domlander
reviewed
Mar 26, 2026
| return [ | ||
| { | ||
| breakpoint: breakpoints.mobile, | ||
| width: 660, |
Contributor
There was a problem hiding this comment.
Should width be 480px here, the same as the mobileLandscape breakpoint?
Contributor
Author
There was a problem hiding this comment.
Good point! It's a bit of a strange one as the images used for Hosted Content pages aren't cropped like editorial content and are often wide and short. This is a little bit of a hack to both improve the image quality and to avoid requesting very large images where we don't need them.
I've taken your point though and I think a smaller image would work ok! I've gone for one size bigger than the actual screen size on the smaller devices as the image looks blurry otherwise (possibly because when we request the image width, that happens before the crop?)
Jakeii
approved these changes
Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
Updates the
Picturecomponent formainMediato allow wide variations of main media image for hosted pages (HostedArticle,HostedVideo,HostedGallery)Why?
When rendering the pages as is, the images are very blurry on wide screens as the width requested from the Fastly image optimiser is just 620px. This PR allows the requested width to be up to 1300px on wide screen sizes. The image is never larger than that due to the designs
Screenshots