swiftimg

← Blog · · 4 min read

Animated GIF to WebP: smaller files, same loop

The GIF format is ancient — it's limited to 256 colors and stores animation inefficiently, so a short clip can balloon to several megabytes. Animated WebP stores the same animation far more efficiently: in practice it's commonly 5–10× smaller at the same visual quality, and it's supported in every current browser.

Why it matters

The easy way: upload and it's automatic

On swiftimg, every animated GIF you upload is converted to an animated WebP automatically — there's nothing to configure. Grids and previews serve the smaller WebP, while the single-image page still serves the original GIF if you need it. Conversion happens after the asset is ready, so it never blocks your upload.

Upload a GIF — get a fast WebP
curl -X POST https://swiftimg.com/v1/images \
  -H "Authorization: Bearer $SWIFTIMG_KEY" \
  -F file=@reaction.gif
# The animated WebP variant is generated and cached globally.

Embedding it

Reference the WebP like any image; browsers play the animation inline:

HTML
<img src="https://i.swiftimg.com/variants/9fK2/anim.webp" alt="Reaction" loading="lazy" />

That's the whole point of an image CDN: upload once, serve the right format everywhere. See the API or just drop a GIF in.

Host your images globally

Free to start — no account needed. Upgrade for the API, transforms, and a custom domain.