[Images] Document text overlays and binding updates - #32883
Open
deannalam wants to merge 1 commit into
Open
Conversation
Contributor
Review
👉 Fix in your agent 👈Fix the following review findings in PR #32883 (https://github.com/cloudflare/cloudflare-docs/pull/32883).
Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification
- If you disagree (e.g. the fix requires disproportionate effort for minimal benefit,
or the finding is factually incorrect), explain why
- If you need clarification before deciding, ask those questions
- Then share your plan for which issues to tackle and in what order
After triaging, follow this order:
1. Post a comment on this PR for any findings you are skipping, with the finding ID and your reasoning.
2. Then commit the fixes for the legitimate findings.
The comment must come before the commit — the bot reads PR comments when a new
push triggers a review, so skip comments posted after the push will be missed.
---
## Code Review
### Warnings (2)
#### CR-1c273c9e4bf5 · Unchecked nullable stream passed to Images input
- **File:** `src/content/docs/images/optimization/binding.mdx` line 114
- **Issue:** The `.input(response.body)` example feeds `fetch()`'s `response.body` directly into `env.IMAGES.input()`. `Response.body` can be `null`, and the fetch can fail, so this can crash or fail TypeScript strictness.
- **Fix:** Check the fetch result before using it, e.g. `if (!response.ok || !response.body) return new Response("Failed to load image", { status: 502 });`.
#### CR-5ede327a2040 · Unchecked nullable stream from `.bytes()`
- **File:** `src/content/docs/images/optimization/binding.mdx` line 164
- **Issue:** The example passes `env.IMAGES.hosted.image("IMAGE_ID").bytes()` directly to `.input()`, but `.bytes()` returns `ReadableStream | null` when the image is not found.
- **Fix:** Guard against a missing image before calling `.input()`, matching the storage binding docs: `if (!bytes) return new Response("Not found", { status: 404 });`.
---
## Style Guide Review
### Warnings (7)
#### SG-28987037901a · Use Markdown image syntax for content images
- **File:** `src/content/docs/images/optimization/draw-overlays.mdx` line 177
- **Issue:** Adds a raw `<img>` tag to embed the composite=over example image
- **Fix:** Use Markdown image syntax: ``
#### SG-b7390a20d31d · Use Markdown image syntax for content images
- **File:** `src/content/docs/images/optimization/draw-overlays.mdx` line 195
- **Issue:** Adds a raw `<img>` tag to embed the composite=in example image
- **Fix:** Use Markdown image syntax: ``
#### SG-9530aba7444b · Use Markdown image syntax for content images
- **File:** `src/content/docs/images/optimization/draw-overlays.mdx` line 205
- **Issue:** Adds a raw `<img>` tag to embed the composite=out example image
- **Fix:** Use Markdown image syntax: ``
#### SG-8f638c458583 · Use Markdown image syntax for content images
- **File:** `src/content/docs/images/optimization/draw-overlays.mdx` line 215
- **Issue:** Adds a raw `<img>` tag to embed the composite=xor example image
- **Fix:** Use Markdown image syntax: ``
#### SG-a43f7858bd68 · Use Markdown image syntax for content images
- **File:** `src/content/docs/images/optimization/draw-overlays.mdx` line 225
- **Issue:** Adds a raw `<img>` tag to embed the composite=lighter example image
- **Fix:** Use Markdown image syntax: ``
#### SG-5c2e3ca49af1 · Contractions
- **File:** `src/content/changelog/images/2026-08-24-images-binding-updates.mdx` line 10
- **Issue:** Added line uses the contractions "We've" and "what's" in body prose.
- **Fix:** Rewrite without contractions, for example: "We have added more ways... Here is what is new:"
#### SG-f94a523cdecc · Contractions
- **File:** `src/content/changelog/images/2026-08-24-images-binding-updates.mdx` line 27
- **Issue:** Added line uses the contraction "can't" in body prose.
- **Fix:** Replace "can't" with "cannot".
Code ReviewThis code review is in beta and may not always be helpful — use your judgment. Warnings (2)
ConventionsNo convention issues found. Style Guide ReviewWarnings (7)
CommandsOnly codeowners can run commands. Post a comment with the command to trigger it.
|
Contributor
|
This PR changes current filenames or deletes current files. Make sure you have redirects set up to cover the following paths:
|
Contributor
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
Contributor
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.
Summary
Documents new capabilities for the Images binding: text rasterization and overlays, metadata filtering, support for signed URLs and Direct Creator Upload URLs, and custom response headers.
Changes
Structural changes
draw-overlays.mdxfromoptimization/transformations/.Updated content
optimization/binding.mdx— Documented the.text()method for rasterizing text into an image, and theheadersoption on.response()for settingCache-Controland other headers without rebuilding theResponse.optimization/draw-overlays.mdx— Documented how text overlays work with bothcf.image(viatextentries in thedrawarray) and the Images binding (via.text()), and split theurl/text/width and heightoptions to distinguish image versus text overlays.storage/binding.mdx— Documented.image(id).signedUrl()for signing private image URLs,.createDirectUpload()for creating Direct Creator Upload links, and themetadataFilteroption on.list()for filtering hosted images by custom metadata.Changelog
2026-08-24).