guardian / guardian/dotcom-rendering

Use master image for DCR TrailType

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

Description

Currently, when converting a Frontend trail type to a DCR trail type, the [image](https://github.com/guardian/dotcom-rendering/blob/main/dotcom-rendering/src/lib/decideTrail.ts#L21)
field is used for the image asset. This field contains an `i.guim.co.uk` URL, which is then converted to a `media.guim.co.uk` URL in the [getSourceImageUrl](https://github.com/guardian/dotcom-rendering/blob/main/dotcom-rendering/src/lib/getSourceImageUrl_temp_fix.ts#L22)
function.

We now have a `masterImage` field in the Frontend trail type that already provides the `media.guim.co.uk` URL. The plan is to update decideTrail to use masterImage instead of image. When doing this, we’ll also need to ensure that getSourceImageUrl is no longer called, since the conversion will no longer be necessary.

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.