Repository navigation
[miniflare] Add local development support for /cdn-cgi/image/ URL transformations [Part 3] - #16678
Merged
petebacondarwin merged 9 commits intoNov 30, 2026
Conversation
🦋 Changeset detectedLatest commit: 8361f2b The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@cloudflare/autoconfig
@cloudflare/build-output-utils
@cloudflare/cli-shared-helpers
@cloudflare/codemods
@cloudflare/config
@cloudflare/containers-shared
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-functions
@cloudflare/pages-shared
@cloudflare/runtime-types
@cloudflare/test-server
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-plugin
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
mglewis
force-pushed
the
mattl/IMAGES-2346-cdn-cgi-image-local-transforms
branch
from
November 3, 2026 14:40
d7cd715 to
ee4ace8
Compare
This was referenced Nov 3, 2026
mglewis
force-pushed
the
mattl/IMAGES-2346-cdn-cgi-image-local-transforms
branch
5 times, most recently
from
November 6, 2026 17:03
789db43 to
268537a
Compare
mglewis
force-pushed
the
mattl/IMAGES-2346-cdn-cgi-image-local-transforms
branch
from
November 16, 2026 15:44
268537a to
a415ccf
Compare
mglewis
force-pushed
the
mattl/IMAGES-2346-cdn-cgi-image-local-transforms
branch
6 times, most recently
from
November 19, 2026 16:54
7c3fd1e to
2be593f
Compare
petebacondarwin
force-pushed
the
mattl/IMAGES-2346-cdn-cgi-image-local-transforms
branch
from
November 20, 2026 07:17
2be593f to
996cc82
Compare
mglewis
force-pushed
the
mattl/IMAGES-2346-cdn-cgi-image-local-transforms
branch
4 times, most recently
from
November 20, 2026 14:37
752f9e9 to
ac48682
Compare
mglewis
marked this pull request as ready for review
November 20, 2026 14:47
…ses and option parsing
mglewis
force-pushed
the
mattl/IMAGES-2346-cdn-cgi-image-local-transforms
branch
from
November 24, 2026 14:15
6a7e3a2 to
92a6a14
Compare
petebacondarwin
requested review from
petebacondarwin
and removed request for
edmundhung
November 25, 2026 13:43
edmundhung
reviewed
Nov 25, 2026
Contributor
|
Codeowners approval required for this PR:
Show detailed file reviewers |
…ins and HTTPS public URL fetches
…ed responses and docs
petebacondarwin
approved these changes
Nov 30, 2026
petebacondarwin
left a comment
Contributor
There was a problem hiding this comment.
LGTM - although I asked a bunch of questions that I'd like to know the answers to before we merge this.
workers-devprod
approved these changes
Nov 30, 2026
workers-devprod
left a comment
Contributor
There was a problem hiding this comment.
Codeowners reviews satisfied
…lify log-once handling and warn about wildcard origins
mglewis
force-pushed
the
mattl/IMAGES-2346-cdn-cgi-image-local-transforms
branch
from
November 30, 2026 15:56
18c0119 to
8361f2b
Compare
Merged
This was referenced Dec 1, 2026
brandhaug
added a commit
to brandhaug/b2b-saas-starter
that referenced
this pull request
Dec 4, 2026
## pnpm-workspace.yaml (default) ## Dependency Updates | Package | From | To | Type | | --- | --- | --- | --- | | `@cloudflare/vitest-plugin` | 1.10.1 | 1.10.2 | patch | | `miniflare` | 5.20261127.1-beta | 5.20261129.0-beta | minor | | `wrangler` | 4.169.1 | 4.170.0 | minor | ## Release Notes <details> <summary><b>@<!---->cloudflare/vitest-plugin</b> (1.10.1 → 1.10.2)</summary> ### Patch Changes - [#17284](cloudflare/workers-sdk#17284) [`5b6e6bf`](cloudflare/workers-sdk@5b6e6bf) Thanks [@<!---->dependabot](https://github.com/apps/dependabot)! - Update `DEFAULT_COMPAT_DATE` to 2026-11-29 Use the bundled workerd release's compatibility date by default when scaffolding new projects or when no compatibility date is configured. - [#17211](cloudflare/workers-sdk#17211) [`b91cef9`](cloudflare/workers-sdk@b91cef9) Thanks [@<!---->jamesopstad](https://github.com/jamesopstad)! - Keep remote bindings working after a failed change to the account or API token is reverted Previously, changing the account ID or API token to credentials that failed to start a remote session (for example, a malformed account ID) disposed the existing session first. Reverting the change then reused that disposed session, so remote bindings stayed offline until the development server was restarted. The existing session is now disposed only once its replacement is ready, so it keeps working if the new credentials fail to start a session. - [#17244](cloudflare/workers-sdk#17244) [`a332568`](cloudflare/workers-sdk@a332568) Thanks [@<!---->dario-piotrowicz](https://github.com/dario-piotrowicz)! - Explain where misplaced fields belong in `cloudflare.config.ts` validation errors Errors for top-level fields such as `accountId` placed under `worker` now explain that they belong at the top level. Worker fields placed at the top level also include a hint to move them inside `worker`. - [#16888](cloudflare/workers-sdk#16888) [`3d78112`](cloudflare/workers-sdk@3d78112) Thanks [@<!---->smile-alive](https://github.com/smile-alive)! - Suppress `Aborting engine` uncaught exceptio …[full notes](https://github.com/cloudflare/workers-sdk/releases/tag/%40cloudflare/vitest-plugin%401.10.2) </details> <details> <summary><b>miniflare</b> (5.20261127.1-beta → 5.20261129.0-beta)</summary> ### Minor Changes - [#16678](cloudflare/workers-sdk#16678) [`7d57524`](cloudflare/workers-sdk@7d57524) Thanks [@<!---->mglewis](https://github.com/mglewis)! - Add local development support for `/cdn-cgi/image/` URL transformations When `images.url_transformations` (or `images.urlTransformations` in `cloudflare.config.ts`) is enabled, Miniflare now handles `/cdn-cgi/image/<options>/<source>` requests locally before they reach your Worker. Requests return a 404 when URL transformations aren't enabled for the Worker, and a 403 when the source image isn't allowed by `allowed_origins`. Transforms use the same low-fidelity Sharp-backed mock as `cf.image` fetches, so only resize, rotate, format conversion and a small set of options are applied. This is a change in behaviour: previously `/cdn-cgi/image/` requests were passed through to the Worker during local development. Requests made through `SELF` in `@cloudflare/vitest-plugin` bypass Miniflare's routing and are not intercepted. ### Patch Changes - [#17284](cloudflare/workers-sdk#17284) [`5b6e6bf`](cloudflare/workers-sdk@5b6e6bf) Thanks [@<!---->dependabot](https://github.com/apps/dependabot)! - Update `DEFAULT_COMPAT_DATE` to 2026-11-29 Use the bundled workerd release's compatibility date by default when scaffolding new projects or when no compatibility date is configured. - [#17284](cloudflare/workers-sdk#17284) [`5b6e6bf`](cloudflare/workers-sdk@5b6e6bf) Thanks [@<!---->dependabot](https://github.com/apps/dependabot)! - Update dependencies of "miniflare", "wrangler" The following dependency versions have been updated: | Dependency | From | To | | ------------------------- | ------------- | ------------- | | @<!---->cloudflare/workers-types | …[full notes](https://github.com/cloudflare/workers-sdk/releases/tag/miniflare%405.20261129.0-beta) </details> <details> <summary><b>wrangler</b> (4.169.1 → 4.170.0)</summary> ### Minor Changes - [#16678](cloudflare/workers-sdk#16678) [`7d57524`](cloudflare/workers-sdk@7d57524) Thanks [@<!---->mglewis](https://github.com/mglewis)! - Add local development support for `/cdn-cgi/image/` URL transformations When `images.url_transformations` (or `images.urlTransformations` in `cloudflare.config.ts`) is enabled, Miniflare now handles `/cdn-cgi/image/<options>/<source>` requests locally before they reach your Worker. Requests return a 404 when URL transformations aren't enabled for the Worker, and a 403 when the source image isn't allowed by `allowed_origins`. Transforms use the same low-fidelity Sharp-backed mock as `cf.image` fetches, so only resize, rotate, format conversion and a small set of options are applied. This is a change in behaviour: previously `/cdn-cgi/image/` requests were passed through to the Worker during local development. Requests made through `SELF` in `@cloudflare/vitest-plugin` bypass Miniflare's routing and are not intercepted. - [#17266](cloudflare/workers-sdk#17266) [`b9bb1b0`](cloudflare/workers-sdk@b9bb1b0) Thanks [@<!---->dependabot](https://github.com/apps/dependabot)! - Support Analog 3 in `wrangler setup` Configure Analog’s standalone Nitro Vite plugin for Cloudflare Workers. Both `wrangler setup` and `create-cloudflare` configure the Minimal starter as a static site. Analog 2 projects continue to use the Nitro options on the Analog Vite plugin. Projects using native Nitro 3 (`nitro/vite`) should use Nitro’s generated Wrangler configuration instead. ### Patch Changes - [#17258](cloudflare/workers-sdk#17258) [`e96e508`](cloudflare/workers-sdk@e96e508) Thanks [@<!---->irvinebroque](https://github.com/irvinebroque)! - Show the plan-specific Time Travel retention window in `wr …[full notes](https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.170.0) </details> --- *This PR was auto-generated by [catalog-update-action](https://github.com/brandhaug/catalog-update-action).* Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.
Fixes IMAGES-2346 (internal).
Adds local dev support for
/cdn-cgi/image/<options>/<source>URL transformations, driven by theimages.url_transformationsconfig from #16679 and applied on deploy by #16680 (both merged)./cdn-cgi/image/before the Worker: 404 unless enabled, 403 if the source is neither same-zone nor inallowed_origins. It reuses the existing Sharp-backedcf.imagemock for the transformallowed_origins, credentials are only sent to same-host sources, and failed cross-zone transforms don't pass origin headers through (mirroring image-resizing-worker)wrangler dev,getPlatformProxyand the Vite plugin/cdn-cgi/image/requests no longer reach the Worker locally unless enabled, matching productionpublic/files resolve