In the process of writing Plavna, I had to write code that could validate images, read the size and primary colors, and upload them both from the client and the server (working with the limitations of Vercel Edge) - because one of the ideas when creating Plavna was that it would work even if the JS didn't load, even for such complicated tasks as the author interface.
This code was also needed for a separate application - Plavna Page Screenshotter (needed for custom preview designs in Plavna), so it was moved to a separate package that is reused by these two applications in the mono repository. The package is supposed to support uploading to various services, but Plavna stores its images in ImageKit, so the ready-made adapter is currently available only for it.
If you're interested in adding this package to your own SvelteKit project and/or want to create new adapters for it, write me and I'll get it ready for NPM publication.