unjs/ipx
🖼️ High performance, secure and easy-to-use image optimizer.
[compare changes](https://github.com/unjs/ipx/compare/v3.1.1...v4.0.0-alpha.1) IPX v4 is now ESM-only and comes with significant dependency size reductions ([v3](http://npmgraph.js.org/?q=ipx@v3) vs [v4 alpha](https://npmgraph.js.org/?q=ipx@4.0.0-alpha.1)). Internal [H3](https://h3.dev) has been upgraded to [v2](https://h3.dev/blog/v2-beta), bringing native Web API compatibility and the new [srvx](https://srvx.h3.dev/) layer for native performance with Node.js support. > [!IMPORTANT] > The programmatic API has changed. See the updated [docs](https://github.com/unjs/ipx/blob/main/README.md#programmatic-api) for usage.
🐛 🩹 Fixes
- fs: Ensure path stays within the exact directory ([#271](https://github.com/unjs/ipx/pull/271))
🐛 🩹 Fixes
- fs: Ensure path stays within the exact directory ([#271](https://github.com/unjs/ipx/pull/271), 81b86b14ac77f58f89602112309cad2cb3d8c16c)
🐛 🩹 Fixes
- fs: Ensure path stays within the exact directory ([#271](https://github.com/unjs/ipx/pull/271), 94627ef55161ab8ea62956bbd71700a77643c03a)
📦 📦 Dependencies
- Upgrade to `svgo@4.0` (#231)
- Upgrade to `sharp@0.34` ([notes](https://sharp.pixelplumbing.com/changelog/#v0340---4th-april-2025))
- Upgrade to `unstorage@1.16`
🧪 ✅ Tests
- Increase coverage ([#260](https://github.com/unjs/ipx/pull/260))
📦 ❤️ Contributors
- Pooya Parsa (@pi0)
- Kanon (@ysknsid25)
- Maxime Pauvert (@maximepvrt)
- Seth Falco (@SethFalco)
🐛 🩹 Fixes
- Correctly handle `format_auto,animated` ([#235](https://github.com/unjs/ipx/pull/235))
📝 📖 Documentation
- Added jsdocs to exported functions and types ([#222](https://github.com/unjs/ipx/pull/222))
📦 ❤️ Contributors
- Max (@onmax)
- James Wragg <james.wragg@madgex.com>
🐛 🩹 Fixes
- http: Properly respect `ignoreCacheControl` option ([96a8489](https://github.com/unjs/ipx/commit/96a8489))
📦 🏡 Chore
- Update lockfile ([6b132ab](https://github.com/unjs/ipx/commit/6b132ab))
📦 ❤️ Contributors
- Pooya Parsa ([@pi0](http://github.com/pi0))
IPX v3 is upgraded with sharp ^0.33 with major installation enhancements. See https://github.com/lovell/sharp/issues/3750 for more info.
📦 🚀 Enhancements
- node-fs: Add support for multiple dirs ([#203](https://github.com/unjs/ipx/pull/203))
🐛 🩹 Fixes
- Missing `maxAge` default ([#197](https://github.com/unjs/ipx/pull/197))
- server: Set `cache-control` header only after processing image ([#200](https://github.com/unjs/ipx/pull/200))
- Improve data parsing for unstorage ([#204](https://github.com/unjs/ipx/pull/204))
♻️ 💅 Refactors
- Jpeg progressive setting via sharpOptions ([#198](https://github.com/unjs/ipx/pull/198))
📦 ❤️ Contributors
- Arkadiusz Sygulski <aareksio@gmail.com>
- Pooya Parsa ([@pi0](http://github.com/pi0))
- Ucw
- James Wragg <me@jameswragg.com>
- Bobbie Goede <bobbiegoede@gmail.com>
📋 What's Changed
- fix: allow httpStorage `allowAllDomains` config param to be used. by @Jarrku in https://github.com/unjs/ipx/pull/189
- deps: update to svgo v3.0.3 by @SethFalco in https://github.com/unjs/ipx/pull/188
✨ New Contributors
- @Jarrku made their first contribution in https://github.com/unjs/ipx/pull/189
- Full Changelog: https://github.com/unjs/ipx/compare/v2.0.1...v2.0.2
🐛 🩹 Fixes
- svgo: Handle javascript uris in `removexss` plugin ([#186](https://github.com/unjs/ipx/pull/186))
📦 ❤️ Contributors
- Seth Falco ([@SethFalco](http://github.com/SethFalco))
📦 🚀 Enhancements
- CLI rewritten with [unjs/citty](https://github.com/unjs/citty) ([#167](https://github.com/unjs/ipx/pull/167))
- Server rewritten with [unjs/h3](https://github.com/unjs/h3) ([#168](https://github.com/unjs/ipx/pull/168))
- Optimize + sanitize svg sources with [svgo](https://github.com/svg/svgo) ([#180](https://github.com/unjs/ipx/pull/180))
- Use [unjs/ofetch](https://github.com/unjs/ofetch) to improve http error handling ([ac30512](https://github.com/unjs/ipx/commit/ac30512))
- http: Allow ignoring `cache-control` header with `ignoreCacheControl` ([4690342](https://github.com/unjs/ipx/commit/4690342))
🐛 🩹 Fixes
- Respect global `maxAge` option as fallback ([2abe014](https://github.com/unjs/ipx/commit/2abe014))
- server: Improve `304` handling ([06820b5](https://github.com/unjs/ipx/commit/06820b5))
- server: Append `Vary` header instead of overriding it ([fb3cf1d](https://github.com/unjs/ipx/commit/fb3cf1d))
- server: Set headers only if not already set ([ce0cf0e](https://github.com/unjs/ipx/commit/ce0cf0e))
♻️ 💅 Refactors
- Rewrite storage system decoupling from Node.js and with [unjs/unstorage](https://github.com/unjs/unstorage) support ([#164](https://github.com/unjs/ipx/pull/164))
- Improve error handling ([9826cda](https://github.com/unjs/ipx/commit/9826cda))
- Upgrade to [unjs/image-meta](https://github.com/unjs/image-meta) 0.2.x ([1017deb](https://github.com/unjs/ipx/commit/1017deb))
📦 ❤️ Contributors
- Pooya Parsa ([@pi0](http://github.com/pi0))
- Matt Kane <m@mk.gg>
- Sébastien Chopin ([@Atinux](http://github.com/Atinux))
🐛 🩹 Fixes
- Update sharp to `^0.32.6` ([#177](https://github.com/unjs/ipx/pull/177))
📦 🏡 Chore
- Update non-major dependencies ([6254052](https://github.com/unjs/ipx/commit/6254052))
📦 🤖 CI
- Enable ci for v1 branch ([61e851b](https://github.com/unjs/ipx/commit/61e851b))
📦 ❤️ Contributors
- Pooya Parsa ([@pi0](http://github.com/pi0))
- Matt Kane <m@mk.gg>
📦 🚀 Enhancements
- Use `ofetch` to improve http error handling ([ac30512](https://github.com/unjs/ipx/commit/ac30512))
♻️ 💅 Refactors
- Improve error handling ([9826cda](https://github.com/unjs/ipx/commit/9826cda))
📝 📖 Documentation
- Typo ([dcd8d72](https://github.com/unjs/ipx/commit/dcd8d72))
📦 🏡 Chore
- Update docs ([b88925e](https://github.com/unjs/ipx/commit/b88925e))
📦 ❤️ Contributors
- Pooya Parsa ([@pi0](http://github.com/pi0))
- Sébastien Chopin ([@Atinux](http://github.com/Atinux))
📦 🚀 Enhancements
- Rewrite CLI with [unjs/citty](https://github.com/unjs/citty) ([#167](https://github.com/unjs/ipx/pull/167))
- Rewrite server with [unjs/h3](https://github.com/unjs/h3) ([#168](https://github.com/unjs/ipx/pull/168))
- Rewrite storage system with (unjs/unstorage](https://github.com/unjs/unstorage) compatibility ([#164](https://github.com/unjs/ipx/pull/164))
📦 🚀 Enhancements
- handlers: Support `kernel` modifier ([#143](https://github.com/unjs/ipx/pull/143))
🐛 🩹 Fixes
- Provide options to sharp method ([#138](https://github.com/unjs/ipx/pull/138))
- Add `heic` to the supported formats ([#130](https://github.com/unjs/ipx/pull/130))
📝 📖 Documentation
- Mention background modifier ([#156](https://github.com/unjs/ipx/pull/156))
- Update `background` modifier example ([2c6ad22](https://github.com/unjs/ipx/commit/2c6ad22))
- Add `h3` middleware example ([#144](https://github.com/unjs/ipx/pull/144))
📦 📦 Build
- Update exports field for type support ([f43772b](https://github.com/unjs/ipx/commit/f43772b))
📦 🤖 CI
- Add autofix ([3bffaa4](https://github.com/unjs/ipx/commit/3bffaa4))
📦 ❤️ Contributors
- Pooya Parsa ([@pi0](http://github.com/pi0))
- Dominik Opyd <dominik.opyd@gmail.com>
- Aura Román ([@kyranet](http://github.com/kyranet))
- Paweł Szafrański <szafran89@gmail.com>
- Lexpeartha
- Daniel Roe <daniel@roe.dev>
📦 🚀 Enhancements
- Support experimental `auto` format ([#85](https://github.com/unjs/ipx/pull/85))
- middleware: Add fallthrough option to handle error with next callback ([#116](https://github.com/unjs/ipx/pull/116))
- Support working `extract` modifier` ([#114](https://github.com/unjs/ipx/pull/114))
🐛 🩹 Fixes
- middleware: Sanitize double backslashes and quotes ([#115](https://github.com/unjs/ipx/pull/115))
- middleware: Handle multple argument modifiers ([e4ef303](https://github.com/unjs/ipx/commit/e4ef303))
♻️ 💅 Refactors
- Enable strict typechecks ([#133](https://github.com/unjs/ipx/pull/133))
📦 🏡 Chore
- Update dependencies ([1499333](https://github.com/unjs/ipx/commit/1499333))
- Simplify readme ([5391abb](https://github.com/unjs/ipx/commit/5391abb))
- Update badges ([3832a81](https://github.com/unjs/ipx/commit/3832a81))
- Update vitest ([e934194](https://github.com/unjs/ipx/commit/e934194))
📦 ❤️ Contributors
- Pooya Parsa ([@pi0](http://github.com/pi0))
- Haruaki OTAKE <aaharu@hotmail.com>
📦 🚀 Enhancements
- Support `sigma` parameter for `blur` operation ([#124](https://github.com/unjs/ipx/pull/124))
📦 🏡 Chore
- Update deps ([f38536d](https://github.com/unjs/ipx/commit/f38536d))
📦 ❤️ Contributors
- Pooya Parsa ([@pi0](http://github.com/pi0))
- Carlos Peña ([@carlo697](http://github.com/carlo697))
[compare changes](https://github.com/unjs/ipx/compare/v1.0.0...v1.0.1)
🐛 🩹 Fixes
- Use utc format for `Last-Modified` header ([#89](https://github.com/unjs/ipx/pull/89))
- Update defu import ([c55f878](https://github.com/unjs/ipx/commit/c55f878))
♻️ 💅 Refactors
- Use `node-fetch-native` ([165519e](https://github.com/unjs/ipx/commit/165519e))
📦 ❤️ Contributors
- Pooya Parsa ([@pi0](http://github.com/pi0))
- Nozomu Ikuta <nick.0508.nick@gmail.com>
- Haruaki OTAKE ([@aaharu](http://github.com/aaharu))
