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
Compare swiftimg and Amazon S3: hosting workflows, editing, costs and migration.
Hosting for Hugo works on the free plan — see swiftimg pricing and plan limits for what each tier includes, or read the image hosting API documentation to upload from your own code instead of the browser.
Ready to host your Hugo images?
Browser uploads and API access are available free. Paid plans add higher limits; Developer and Business include signed transforms and custom domains. Commercial use requires Business.