-
Notifications
You must be signed in to change notification settings - Fork 30
Stub PR: Fix preview.code.dev-gutools.co.uk
display of CODE Grid images
#13899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Size Change: +6 B (0%) Total Size: 973 kB ℹ️ View Unchanged
|
preview.code.dev-gutools.co.uk
display of CODE Grid imagespreview.code.dev-gutools.co.uk
display of CODE Grid images
Closed in favour of #13904 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
this PR was only a fragment of hard-coding, and replaced by #13904
In CODE preview, display of images from non-PROD Grid is broken:
...which makes demonstrating functionality in CODE difficult.
Example broken image
See the broken main image in CODE preview:
https://preview.code.dev-gutools.co.uk/environment/2025/may/02/testing-dotcom-rendering-pr-13899-an-article-created-in-code-with-an-image-from-code-grid
The page is linking to:
https://i.guim.co.uk/img/media/cd89dca0643836559747660546ce00c972ce0f56/0_302_4032_2419/master/4032.jpg?width=620&dpr=1&s=none&crop=none
...which does not exist. However, change
i.guim.co.uk
toi.guimcode.co.uk
:https://i.guimcode.co.uk/img/media/cd89dca0643836559747660546ce00c972ce0f56/0_302_4032_2419/master/4032.jpg?width=620&dpr=1&s=none&crop=none
...and it does.
Background
This is the crop in the Grid:
https://media.test.dev-gutools.co.uk/images/cd89dca0643836559747660546ce00c972ce0f56?crop=0_302_4032_2419
We can see that the JSON sent by Frontend to DCR does contain the information that the image is from the non-PROD Grid:
https://preview.code.dev-gutools.co.uk/environment/2025/may/02/testing-dotcom-rendering-pr-13899-an-article-created-in-code-with-an-image-from-code-grid.json
eg linking to:
https://media.guimcode.co.uk/cd89dca0643836559747660546ce00c972ce0f56/0_302_4032_2419/master/4032.jpg
...however it looks like DCR is ignoring the domain, and just using the image id?
PROD images
eg on https://www.theguardian.com/commentisfree/2016/sep/08/the-guardian-view-on-the-raspberry-pi-small-is-beautiful
https://www.theguardian.com/commentisfree/2016/sep/08/the-guardian-view-on-the-raspberry-pi-small-is-beautiful.json

The JSON sent to DCR links to:
https://i.guim.co.uk/img/media/f6e0f05bb53d371129712e154a66aad713b42b1b/0_340_5616_3370/master/5616.jpg?width=700&quality=85&auto=format&fit=max&s=e90cdf967a5e6668437e3c41e208f398
...and the rendered HTML links to:
https://i.guim.co.uk/img/media/f6e0f05bb53d371129712e154a66aad713b42b1b/0_340_5616_3370/master/5616.jpg?width=700&dpr=1&s=none&crop=none
cc @CDicksonG