Heads-up
If your images live in `src/lib/images`, `enhanced-img` is the lowest-friction choice. swiftimg fits when images are uploaded outside the build (user content, CMS, mobile).
Step by step
1. Use a plain <img> with the swiftimg URL
No SvelteKit config needed for remote URLs — they're just strings.
Component <img src="https://i.swiftimg.com/abc123.png" alt="..." width="1200" height="630" />2. Generate a responsive srcset
On the Developer plan, build a srcset from width hints.
Component <img src="https://i.swiftimg.com/abc123.png?w=1200&sig=..." srcset="https://i.swiftimg.com/abc123.png?w=480&sig=... 480w, https://i.swiftimg.com/abc123.png?w=1200&sig=... 1200w" sizes="(max-width: 600px) 100vw, 1200px" alt="..." />3. Upload from a SvelteKit server route
Use a +server.ts endpoint to push files to /v1/images via the REST API with your API key.
SvelteKit — FAQ
Will @sveltejs/enhanced-img still work?
Yes for in-repo images. enhanced-img doesn't process remote URLs, so swiftimg sits next to it for everything coming from outside the build.
Can I use swiftimg URLs with adapter-static?
Yes — the build output just embeds the absolute URL. swiftimg delivers globally regardless of host.
Does Vite's image-import plugin help?
Only for files imported at build time. Use it for in-repo art and swiftimg for content uploaded after deploy.
See also
Image hosting for Next.js
Use swiftimg as the remote image source for next/image. Permanent URLs, automatic WebP, on-the-fly resize via the loader, and flat, predictable pricing.
Image hosting for Vue / Nuxt
Configure @nuxt/image (or your own Vue component) to fetch from swiftimg. Permanent URLs, on-the-fly resize, and global delivery.
Image hosting for Astro
Reference swiftimg URLs from Astro's <Image /> component. Permanent URLs, automatic WebP variants, on-the-fly resize, and global delivery.
swiftimg vs imgix
An imgix alternative for real-time image transforms — without the enterprise price tag.
Ready to host your SvelteKit images?
Start free, then unlock the full API, transforms, signed URLs, and a custom domain on the Developer plan.