Conversation
Three README images are referenced by a repository-relative path. That resolves on GitHub, but the API reference site renders the README at a different base URL, so the browser requests the images from a path that does not exist and they silently render as broken. Confirmed against the live pages: - `images/ui-screenshot.png` on the aws_synthetics page resolves to `https://docs.aws.amazon.com/cdk/api/v2/docs/images/ui-screenshot.png` - `doc-images/unprocessed-template.png` and `doc-images/processed-template.png` on the cloudformation_include page resolve to `https://docs.aws.amazon.com/cdk/api/v2/docs/doc-images/...` All three load with `naturalWidth === 0`. Every other image on those pages is referenced absolutely and renders correctly, which is the pattern the status badges at the top of every module README already follow. Point the three references at `raw.githubusercontent.com`, which serves them as `image/png`. These are the only repository-relative image references left in the repo, so no other README is affected. No code block is touched, so Rosetta is unaffected. One decision worth flagging: the URLs are pinned to `main` rather than to a commit SHA. That keeps them consistent with how the READMEs already link to other repository content and lets the images be updated in place, at the cost of breaking if the files are ever moved or renamed. Happy to pin to a SHA instead if maintainers prefer immutability. closes aws#34023 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
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
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.
Issue # (if applicable)
Closes #34023.
Reason for this change
Three README images are referenced by a repository-relative path. That resolves on GitHub, but the API reference site renders the README at a different base URL, so the browser requests the images from a path that does not exist and they silently render as broken.
Confirmed against the live pages:
naturalWidthimages/ui-screenshot.pnghttps://docs.aws.amazon.com/cdk/api/v2/docs/images/ui-screenshot.png0doc-images/unprocessed-template.pnghttps://docs.aws.amazon.com/cdk/api/v2/docs/doc-images/unprocessed-template.png0doc-images/processed-template.pnghttps://docs.aws.amazon.com/cdk/api/v2/docs/doc-images/processed-template.png0Every other image on those same pages is referenced absolutely and renders correctly, which is the pattern the status badges at the top of every module README already follow.
Description of changes
Point the three references at
raw.githubusercontent.com, which serves them asimage/png. The image files themselves are unchanged and stay where they are.These are the only repository-relative image references left in the repo, so no other README is affected:
No code block is touched, so Rosetta is unaffected.
One decision worth flagging: the URLs are pinned to
mainrather than to a commit SHA. That keeps them consistent with how the READMEs already link to other repository content, and lets the images be updated in place, at the cost of breaking if the files are ever moved or renamed. Happy to pin to a SHA instead if you prefer immutability.An alternative considered and rejected: removing the images altogether. They carry real explanatory value — the
cloudformation-includepair shows the exact "View processed template" checkbox state the surrounding prose depends on — so fixing the reference seemed better than dropping the content. Happy to switch to removal if that is the preferred direction.Describe any new or updated permissions being added
None. This is a documentation-only change.
Description of how you validated changes
No unit or integration tests, as no code changed.
Validated by hand:
<img>. The three relative references resolve under/cdk/api/v2/docs/and reportnaturalWidth === 0; all absolutely-referenced images on the same pages report a non-zero width.image/pngwith the expected dimensions — 1156×315, 2278×536 and 2280×566 respectively.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license