guardian / guardian/dotcom-rendering
Use master image for DCR TrailType
- 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
Assessment
This issue has not been assessed yet.