Bun.Image as an additional, self-hosted provider alongside ipx
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 331
- Avg merge
- 19h 52m
- Merged PRs (30d)
- 9
Description
Now that Bun has a dedicated image module (Bun.Image), the ability to utilize it as an additional self-hosted provider alongside ipx is now a possibility.
It is an image resizing pipeline built into the Bun runtime itself with an API similar to sharp.
The benefit is that it allows the potential to both reduce dependencies and improve performance.
Proposal
- Add
bun/bunStatic, mirroringipx/ipxStatic. - Use same URL grammar
(/_bun/<modifiers>/<src>), with the same modifier names and same option shape, providing a simple config change option to move between ipx and Bun as the self-hosted provider. - A new 'auto' provider option can auto-resolve Bun.Image instead of hard-wiring
ipxas the default provider if thebunNitro preset is used, or the build runs with Bun. - Make ipx an optional peer dependency rather than an optional dependency, so a Bun deployment installs only what's needed.
What Bun.Image cannot do yet
Bun.Image is currently (as of 9/2/2026) only a subset of sharp's capabilities:
- Resize fits are
fillandinsideonly.cover,contain, andoutsideare not available yet, but PRs are upstream for this functionality - Some modifiers do not exist yet (blur, sharpen, trim, extend, position, tint and a few more).
- AVIF and HEIC encoding still depend on OS codecs. GIF and TIFF outputs are unsupported. SVG and animated WebP formats will need to fallback to ipx.
Documentation will be needed for the bun provider, its usage, and limitations.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing ipx/ipxStatic provider implementation, its URL grammar and configuration, then compare those interfaces with Bun.Image. Done means a bun/bunStatic provider, optional ipx peer dependency, auto provider selection, fallback and limitation handling, and documentation covering usage and constraints.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bun, typescript
- Domain
- backend, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100