Skip to content

Use correct image size for Flexible containers in half-width slot#14253

Merged
domlander merged 3 commits intomainfrom
doml/flex-gen-half-width-images
Jul 24, 2025
Merged

Use correct image size for Flexible containers in half-width slot#14253
domlander merged 3 commits intomainfrom
doml/flex-gen-half-width-images

Conversation

@domlander
Copy link
Contributor

@domlander domlander commented Jul 22, 2025

What does this change?

Uses the small image size instead of medium in the half-width layout of the Flexible General & Flexible Special containers.

Why?

We have been serving unnecessarily large images in the Flexible containers half-width layout slot. The width available at the breakpoints is as follows:

  • Desktop: 220px
  • Tablet: 160px
  • Mobile: 122.5px

The small image size matches up to the space available, whereas the medium image size is too large:

case 'small':
	return [
		{ breakpoint: breakpoints.mobile, width: 120, aspectRatio },
		{ breakpoint: breakpoints.tablet, width: 160, aspectRatio },
		{ breakpoint: breakpoints.desktop, width: 220, aspectRatio },
	];

case 'medium':
	return [
		{ breakpoint: breakpoints.mobile, width: 465, aspectRatio },
		{ breakpoint: breakpoints.tablet, width: 330, aspectRatio },
		{ breakpoint: breakpoints.desktop, width: 460, aspectRatio },
	];

Screenshots

The below screenshots show the width available for images in the Flexible General half-width layout slot at the different breakpoints.

mobile mobile-before
tablet tablet-before
desktop desktop-before

Flexible General half-width layout slot example

image

@github-actions
Copy link

github-actions bot commented Jul 22, 2025

@domlander domlander added fronts + curation run_chromatic Runs chromatic when label is applied labels Jul 22, 2025
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Jul 22, 2025
@domlander domlander force-pushed the doml/flex-gen-half-width-images branch from 4dd250b to c8c1beb Compare July 22, 2025 13:30
@domlander domlander added the run_chromatic Runs chromatic when label is applied label Jul 22, 2025
@github-actions
Copy link

github-actions bot commented Jul 22, 2025

@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Jul 22, 2025
@domlander domlander force-pushed the doml/flex-gen-half-width-images branch from c8c1beb to c93c12d Compare July 23, 2025 10:46
@domlander domlander changed the title Use correct image size for flexible general half-width layout Use correct image size for Flexible containers in half-width slot Jul 23, 2025
@domlander domlander added the run_chromatic Runs chromatic when label is applied label Jul 23, 2025
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Jul 23, 2025
@domlander domlander force-pushed the doml/flex-gen-half-width-images branch from c93c12d to ac2d51d Compare July 23, 2025 14:14
@domlander domlander added the run_chromatic Runs chromatic when label is applied label Jul 23, 2025
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Jul 23, 2025
@domlander domlander added the run_chromatic Runs chromatic when label is applied label Jul 23, 2025
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Jul 23, 2025
@domlander domlander force-pushed the doml/flex-gen-half-width-images branch from f7707a6 to 1678b76 Compare July 23, 2025 15:11
@domlander domlander added the run_chromatic Runs chromatic when label is applied label Jul 23, 2025
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Jul 23, 2025
@domlander domlander marked this pull request as ready for review July 23, 2025 16:20
@github-actions
Copy link

Hello 👋! When you're ready to run Chromatic, please apply the run_chromatic label to this PR.

You will need to reapply the label each time you want to run Chromatic.

Click here to see the Chromatic project.

@domlander domlander requested a review from abeddow91 July 24, 2025 10:23
@domlander domlander merged commit 3aa3839 into main Jul 24, 2025
32 checks passed
@domlander domlander deleted the doml/flex-gen-half-width-images branch July 24, 2025 10:46
@prout-bot
Copy link

Seen on PROD (merged by @domlander 8 minutes and 22 seconds ago) Please check your changes!

@domlander domlander added the maintenance Departmental tracking: maintenance work, not a fix or a feature label Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dotcom-rendering fronts + curation 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