Heads-up
Hugo's `resources/_gen` cache helps with cold builds, but the artifact size compounds with every image variant. swiftimg moves that cost off-repo.
Step by step
1. Upload from the CLI
Use `@swiftimg/cli` to push an image, or drop it at /upload and copy the URL.
Shell swiftimg upload hero.png2. Reference the URL from a partial
Hugo templates accept absolute URLs in `img` tags without configuration.
layouts/partials/hero.html {{- with .Params.hero }} <img src="{{ . }}" alt="{{ $.Title }}" /> {{- end }}3. Use a srcset for responsive delivery
Append width hints to the URL to get a srcset on the Developer plan.
Responsive srcset srcset="https://i.swiftimg.com/abc123.png?w=480&sig=... 480w, https://i.swiftimg.com/abc123.png?w=960&sig=... 960w, https://i.swiftimg.com/abc123.png?w=1920&sig=... 1920w"
Hugo — FAQ
Will Hugo's own image processing still work?
Yes — they coexist. Use in-repo `resources` for editorial control over a few hero images, and swiftimg for the long tail.
How does this affect build time?
Hugo no longer needs to resize each variant — that's the biggest win for sites with large image libraries.
Can I use this with the Hugo Modules / theme ecosystem?
Yes — themes just need an absolute URL. No theme-specific changes required.
See also
Image hosting for Static sites (Hugo, Jekyll, Eleventy)
Offload images from your static-site repo to swiftimg. Smaller repo, faster builds, automatic WebP variants, and on-the-fly resizing — no plugin required.
Image hosting for Eleventy (11ty)
Reference swiftimg URLs from Eleventy templates and Markdown. Permanent URLs, automatic WebP, and no @11ty/eleventy-img runtime needed.
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 Amazon S3
Cheaper than S3 for image hosting once you count egress, signing, and the missing transform layer.
Ready to host your Hugo images?
Start free, then unlock the full API, transforms, signed URLs, and a custom domain on the Developer plan.