ImageToSVG

SVG primitiveUnits Attribute

primitiveUnits determines whether values like feGaussianBlur's stdDeviation are absolute user-space units or bounding-box fractions.

Preset:
Colors:
VTracer vectorization + SVGO optimizationPrivacy protected

How primitiveUnits Affects Primitive Values

primitiveUnits defaults to userSpaceOnUse, meaning values like feGaussianBlur's stdDeviation or feOffset's dx/dy are absolute numbers in user space, while setting primitiveUnits to objectBoundingBox instead scales those same values as fractions of the filtered element's bounding box dimensions, making blur amounts scale proportionally with element size.

  • The default userSpaceOnUse treats primitive values as absolute user-space numbers
  • objectBoundingBox instead scales values as fractions of the element's bounding box
  • objectBoundingBox mode makes blur radius scale proportionally with element size

When to Change primitiveUnits from the Default

Most hand-written filters leave primitiveUnits at its userSpaceOnUse default since fixed pixel-like blur amounts are usually what's intended, but objectBoundingBox becomes useful for reusable filter definitions applied to elements of varying sizes where the blur or offset should scale proportionally rather than staying a fixed absolute amount.

  • Most hand-written filters keep the default userSpaceOnUse for fixed blur amounts
  • objectBoundingBox helps reusable filters applied to elements of varying sizes
  • Proportional scaling avoids a blur looking too strong on small elements

Frequently Asked Questions

Is primitiveUnits the same as filterUnits?

No, filterUnits controls the filter region's own x/y/width/height coordinates, while primitiveUnits controls the coordinate scale of values inside individual filter primitives like stdDeviation.

Why would a blur look different on two differently sized shapes?

If primitiveUnits is userSpaceOnUse, a fixed stdDeviation applies the same absolute blur radius to both shapes, which can look proportionally stronger on the smaller one.

Related guides

Ready to Convert Your Image to SVG?

Free online converter — no sign-up, no watermarks, results in under 3 seconds.

Try It Free — Convert Image to SVG