I've been working on a new docs site for https://replicate.com/ and we're using Remix as a front-end framework and MDX for all of our technical writing.
We co-locate all of our high-res image assets in the repository itself, and were looking for a way to, at dev and build time:
- Convert and resize images on-demand (e.g., to next-gen formats like
.webp
) - Generate LQIP assets
- Extract metadata from the underlying image asset, such as width and height.
The most recent of version of Remix works as a Vite plugin, which means you as the developer have access to the wonderful ecosystem of Vite at your disposal when building your site.
We discovered an awesome library which handles most of the aforementioned functionality: vite-imagetools
.