openimg (Open Image) is a set of JavaScript packages for working with images on the web. It includes a React component, server-side code for Node and Bun, and a Vite plugin. Every part is built to work smoothly together, but you can also use them individually.
The easiest way to get started is to integrate openimg as an image optimization endpoint on your existing server. From there, you can utilize the React component to query for optimized images and use the Vite plugin to integrate local image assets from your Vite project. You can follow the optimization endpoint guide for a step-by-step walkthrough.
Find the changelog here: CHANGELOG.md
Why another image optimization package? I wanted a full-stack solution that works out of the box with minimal setup. This could have been a small wrapper around unjs/ipx and unpic/image, but I first wanted to build something from scratch and minimize dependencies (other than sharp).
The HTTP request handler is inspired by this Gist by Jacob Ebey that showcases how to use sharp with stream processing.
$ claude mcp add openimg \
-- python -m otcore.mcp_server <graph>