Repository navigation
Conversation
🦋 Changeset detectedLatest commit: 85a2fbe The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 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
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
mglewis
force-pushed
the
mattl/IMAGES-2346-cdn-cgi-images-support-in-miniflare
branch
from
June 22, 2026 16:07
344ecda to
85a2fbe
Compare
Member
Author
|
Superseded by #16678. |
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
Note: This is a draft change that will not be shipped imminently. We need a workable solution that is compatible with workers.dev and production zones before release.
Context
The ambition is to build on the previous
cf.imageworker fetch deliverable (#14221) by supporting Image Transformations via the/cdn-cgi/image/URL. This feature allows Cloudflare customers to resize images with a URL that looks something likeImage resizing by URL currently doesn't work on both
workers.devzones and locally withwrangler dev. This change adds support in miniflare to solve the local issues, but we'll hold off releasing until we can ensure parity across all three different environments.Summary of changes
cdn-cgi-image.worker.tsthat parses/cdn-cgi-/image/<opts>/<src>shared URLs and hands the bytes + options back to our existingcfImageLocalFetcher.IMAGE_TRANSFORMto ourCorePathslistcf.imagefetch changeEnvironment.images andCfImagesBinind` to carry new URL transformation config - this is WIP and will be nailed down once we have a more nailed down solution for other envsConsiderations
images.bindingis currently still required, even if it is not being used. Food for thought when we circle back to thisFastlyandAkamaiadapters are not supportedcf.imagefetches and the images binding mock - we only support a limited subset of URL transformation features (width, height, fit, rotate, format, quality, ..)Testing
Local testing with
Unit tests