Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions dotcom-rendering/src/components/Picture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,47 @@ const decideImageWidths = ({
{ breakpoint: breakpoints.wide, width: 1900 },
];
}
/**
* We allow larger images for Hosted Content pages due to
* the design of these being wider
*/
if (
format.design === ArticleDesign.HostedArticle ||
format.design === ArticleDesign.HostedVideo ||
format.design === ArticleDesign.HostedGallery
) {
return [
{
breakpoint: breakpoints.mobile,
width: breakpoints.mobileLandscape,
aspectRatio: '5:4',
},
{
breakpoint: breakpoints.mobileLandscape,
width: breakpoints.phablet,
aspectRatio: '5:3',
},
{
breakpoint: breakpoints.phablet,
width: breakpoints.tablet,
aspectRatio: '5:3',
},
{
breakpoint: breakpoints.tablet,
width: breakpoints.desktop,
aspectRatio: '5:3',
},
{
breakpoint: breakpoints.desktop,
width: breakpoints.leftCol,
},
{
breakpoint: breakpoints.leftCol,
width: breakpoints.wide,
},
{ breakpoint: breakpoints.wide, width: breakpoints.wide },
];
}
switch (format.display) {
case ArticleDisplay.Showcase:
case ArticleDisplay.NumberedList: {
Expand Down
Loading