feat(cdn): add Autorender image CDN provider - #2584
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 |
|
simonihmig
left a comment
There was a problem hiding this comment.
Hey @vasanth-rb, just came back from vacation to see this PR. This is great, much appreciated! 👍
This is perfectly fine to merge. For the other CDNs, I have samples added to the bunch of demo apps in this repo (./apps folder), to have a way to see them working end to end. I am happy to take it from here, or would you be able to add them as well? Here is a previous PR for comparison.
Part of that would be to have an "account" set up of some sorts, so the CDN will actually deliver something. Help me understand, that LOKVTtKVGb workspace, is that something we can use for that?
And btw, much luck with your startup! 🤞



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.