For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dashboard
GuidesIntegrationsAPI ReferencesRelease notes
GuidesIntegrationsAPI ReferencesRelease notes
  • Introduction
    • Overview
    • Quick Start
    • Projects
    • Billing
  • Uploading
    • Overview
    • Uploading files with API
    • File analysis on upload
  • Optimization
    • Overview
  • Transformations
      • Overview
      • Resize, crop, rotation
      • Overlays and watermarks
      • Effects and enhancements
      • Face-detection based transformations
      • SVG transformations
      • Background removal
      • Baked transformations
      • Object recognition
  • Delivery
    • Overview
    • On-the-fly operations
    • CDN settings
    • Proxy
  • Security
    • Overview
    • Validation and moderation
    • Signed uploads
    • Signed URLs
    • Unsafe content moderation
    • Malware protection
    • HIPAA workflows
  • Storage
    • Uploadcare storage
    • Cloudflare R2
    • Google Cloud Storage
    • Azure Blob Storage
  • File management
    • Overview
    • Managing files
    • File groups
    • Webhooks
    • Arbitrary file metadata
  • CLI
    • Overview
    • Configuration
  • Migration
    • Migration to Uploadcare
    • Migration from Filestack
Dashboard
LogoLogo
TransformationsImage

SVG transformation and rasterization

Was this page helpful?
Previous

Background removal

Next
Built with

Any image transformation CDN URL is valid with an SVG file. Most operations don’t affect the response SVG body, while geometric operations (crop, preview, resize, scale_crop) change SVG attributes and work as expected.

To apply full range of operations on SVG file, it should be rasterized by applying -/rasterize/ operation.

Note: Operation is safe to apply to any image. Non-SVG images won’t be affected by this operation.

Rasterized image

Rasterized SVG image -/rasterize/

Blurred image

Blurred image -/rasterize/-/blur/50/

Blurred image

Inverted colors -/rasterize/-/invert/

The following elements may not be correctly rasterized:

  • HTML embedded via foreignObject element
  • Custom fonts
  • Animation
  • Base64-encoded image data URIs

SVGs uploaded before May 26, 2021 still have is_image: false and adding processing operations to them will result in error. Contact support to batch process previously uploaded files.