guardian / guardian/dotcom-rendering

Update TrailType with field masterImage for Galleries

Open
#14,445 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
274
Forks
34
Avg merge
2d 22h
Merged PRs (30d)
121

Description

The TrailType type doesn't have the field `masterImage` while the FETrailType type has.

In [`getSourceImageUrl_temp_fix`](https://github.com/guardian/dotcom-rendering/blob/main/dotcom-rendering/src/lib/getSourceImageUrl_temp_fix.ts#L22) we are getting the image url (i.guim) rather than the masterImage url (media.guim) and converting it into a media.guim url.

Then later on, in [`generateImageURL`](https://github.com/guardian/dotcom-rendering/blob/main/dotcom-rendering/src/lib/image.ts#L49) the media.guim url is converted back to i.guim url :)

We'd probably want to use the masterImage rather than the image url from FETrailType and avoid the multiple conversions.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.