Skip to content

Improve resolution of Hosted Content main media images#15600

Merged
cemms1 merged 3 commits intomainfrom
cemms1/fix-hosted-main-media-resolution
Mar 27, 2026
Merged

Improve resolution of Hosted Content main media images#15600
cemms1 merged 3 commits intomainfrom
cemms1/fix-hosted-main-media-resolution

Conversation

@cemms1
Copy link
Contributor

@cemms1 cemms1 commented Mar 26, 2026

What does this change?

Updates the Picture component for mainMedia to 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

Before After
before after
before2 after2

@github-actions
Copy link

github-actions bot commented Mar 26, 2026

@cemms1 cemms1 changed the title allow hosted pages to display wide, high resolution main media images Improve resolution of Hosted Content main media images Mar 26, 2026
@cemms1 cemms1 added Commercial 💰 run_chromatic Runs chromatic when label is applied labels Mar 26, 2026
@cemms1 cemms1 marked this pull request as ready for review March 26, 2026 15:35
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Mar 26, 2026
@cemms1 cemms1 force-pushed the cemms1/fix-hosted-main-media-resolution branch from 844a87f to 50fd5bb Compare March 26, 2026 15:57
@cemms1 cemms1 added the run_chromatic Runs chromatic when label is applied label Mar 26, 2026
return [
{
breakpoint: breakpoints.mobile,
width: 660,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should width be 480px here, the same as the mobileLandscape breakpoint?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?)

@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Mar 26, 2026
@cemms1 cemms1 added the maintenance Departmental tracking: maintenance work, not a fix or a feature label Mar 26, 2026
@cemms1 cemms1 added the run_chromatic Runs chromatic when label is applied label Mar 26, 2026
@cemms1 cemms1 requested a review from Jakeii March 26, 2026 16:13
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Mar 26, 2026
@cemms1 cemms1 merged commit 3eee7e6 into main Mar 27, 2026
27 checks passed
@cemms1 cemms1 deleted the cemms1/fix-hosted-main-media-resolution branch March 27, 2026 09:08
@gu-prout
Copy link

gu-prout bot commented Mar 27, 2026

Seen on PROD (merged by @cemms1 9 minutes and 3 seconds ago) Please check your changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Commercial 💰 maintenance Departmental tracking: maintenance work, not a fix or a feature Seen-on-PROD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants