svelte-sharp-image This will optimize external and local images using sharp Drop the +server.ts in routes/api/image Drop the Image component wherever you wish Add sharp to your project Caching Cached images are stored in .cache/images.