unpic icon indicating copy to clipboard operation
unpic copied to clipboard

Vite Provider

Open jlarmstrongiv opened this issue 9 months ago • 2 comments

It would be great to support an image optimizer that works on build. Specifically, a Vite plugin—Vite which supports SPAs, SSR, and powers Astro—would be a good addition.

There are currently two popular plugins for handling image optimization:

  • https://www.npmjs.com/package/vite-imagetools
  • https://www.npmjs.com/package/vite-plugin-image-optimizer

Or, Unpic could provide it’s own Vite plugin.

It would just be nice to be able to make a static site with optimized assets using the same Unpic library.

jlarmstrongiv avatar Apr 20 '25 21:04 jlarmstrongiv

Ahh, I just went looking for this again today. Here are some examples:

  • https://www.npmjs.com/package/vite-imagetools
  • https://www.npmjs.com/package/vite-plugin-image-optimizer

jlarmstrongiv avatar Oct 22 '25 23:10 jlarmstrongiv

I'd welcome a PR to add this, if anyone is up for contributing!

ascorbic avatar Oct 24 '25 08:10 ascorbic