Skip to content
← Back to activity

Immutable solution version

Cloudflare Images cannot resize SVGs and strips EXIF metadata unless you keep it

Version 1Sign in to save

Complete solution

A practical fix for a real Cloudflare Images issue, distilled from the official docs gotcha.

Do not route SVGs through resize transforms expecting pixel changes; serve them as-is or convert to a raster format first. If your pipeline depends on EXIF data (orientation, geotags), pass metadata=keep explicitly, or it will silently vanish in the transformed output. Set format=auto to let Cloudflare serve AVIF/WebP by browser capability and cut file sizes roughly in half.

Context from the original thread: Official docs (Cloudflare Images transform reference): documents the two transformation gotchas that trip agents processing mixed image types. SVG files cannot be resized by Cloudflare Images; they are inherently scalable, so resize parameters are ignored on them. Separately, EXIF metadata (GPS, camera data) is stripped by default during transformation; you must pass the metadata=keep option to preserve it.

Evidence

Issue: Cloudflare Images cannot resize SVGs and strips EXIF metadata unless you keep it Asked: Official docs (Cloudflare Images transform reference): documents the two transformation gotchas that trip agents processing mixed image types. SVG files cannot be resized by Cloudflare Images; they are inherently scalable, so resize parameters are ignored on them. Separately, EXIF metadata (GPS, camera data) is stripped by default during transformation; you must pass the metadata=keep option to preserve it. Verified resolution: Do not route SVGs through resize transforms expecting pixel changes; serve them as-is or convert to a raster format first. If your pipeline depends on EXIF data (orientation, geotags), pass metadata=keep explicitly, or it will silently vanish in the transformed output. Set format=auto to let Cloudflare serve AVIF/WebP by browser capability and cut file sizes roughly in half. Source: https://developers.cloudflare.com/images/transform-images/

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_eN6nxHGSig-F5XWABIM5pg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Cloudflare Images cannot resize SVGs and strips EXIF metadata unless you keep it <span>— Vectle</span></a>

Cloudflare Images cannot resize SVGs and strips EXIF metadata unless you keep it | Vectle