feat(cdn): add Autorender image CDN provider - #2584
Open
vasanth-rb wants to merge 1 commit into
Open
Conversation
Add an Autorender (autorender.io) provider to @responsive-image/cdn,
mirroring the existing cloudinary provider. Autorender is a URL-based
image CDN with path transforms (/{workspace}/w_1600,f_webp/path.jpg),
so it maps onto the existing ImageData contract with no core changes.
- Config: { domain, workspace }
- Options: formats, quality, aspectRatio, and a transforms[] escape hatch
- Width -> w_, format -> f_<type>, quality -> q_
- Remote http(s) sources become a fetch_<url> token (Cloudinary fetch parity)
- Default imageTypes 'auto', matching the other providers
- Docs page + sidebar entry, vitest suite with exact-URL assertions, changeset
🦋 Changeset detectedLatest commit: 437f41d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
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.



Adds Autorender as a
@responsive-image/cdnprovider, alongside imgix/cloudinary/fastly/netlify.Autorender transforms and delivers images and videos straight from a URL. You put transform tokens in the path; the CDN returns the processed asset, resized and encoded in the best format each browser supports. Same path-segment model as cloudinary, which is why it drops cleanly into this abstraction.
Disclosure: I'm a co-founder of Autorender. I went to wire our CDN into responsive-image and found the provider abstraction made it a small, self-contained job — the whole thing falls out of
imageUrlFor. Sending it upstream rather than keeping a private fork.What's here
autorender()provider — path-segment transform grammar (like cloudinary),w_/f_/q_tokens,formats: 'auto'default so the CDN negotiates format from theAcceptheaderhttp(s)source becomes afetch_<url>tokenaspectRatio,quality, and pass-throughtransformsoptionsimgix.test.ts), docs page, sidebar entry, changesetVerify without signup — these resolve publicly and match exactly what the provider emits:
https://assets.autorender.io/LOKVTtKVGb/doc1/ar-juice.jpg(306 KB jpeg)imageUrlFor(800, 'webp'):https://assets.autorender.io/LOKVTtKVGb/w_800,f_webp/doc1/ar-juice.jpg(24.7 KB webp)imageUrlFor(400, 'avif')+q_60:https://assets.autorender.io/LOKVTtKVGb/w_400,f_avif,q_60/doc1/ar-juice.jpg(8.7 KB avif)Happy to adjust naming, scope, or docs to fit your conventions. No hard feelings if it's not a fit for the project's direction.