Native out of the box image optimization support via Bun #29842
muhammad-fiaz
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This is a follow-up feature request from #29841. I am not sure why the robobun bot
closed it automatically since it is clearly a feature request with no bug to reproduce.
The Idea
Bun should ship with a native image optimization API out of the box, similar to what
Next.js offers with
next/image, but without any framework dependency.Today, developers building directly with Bun have no first-party way to handle:
srcsetgenerationEvery major framework ships this as a primitive. Bun, with its bundler and runtime
combined, is uniquely positioned to offer this natively.
Proposed API
Why Bun
sharprequires native bindings and has no first-party Bun integrationsquooshis abandonedvite-imagetoolsis Vite-specificnext/imageis tied to the Next.js ecosystemA native
Bun.image()API would make Bun a complete full-stack primitive withoutany vendor or framework lock-in.
Would love to hear the community's thoughts and whether maintainers see this as feasible.
Beta Was this translation helpful? Give feedback.
All reactions