imgix APIs
Rendering API
Sanitize SVG

Sanitize SVG

svg-sanitize

Note

By default, this parameter is set to true, when not specified.

Accepted values are boolean true or false.

When set to true, the SVG will be sanitized to remove any potentially harmful content.

This includes removing script elements, onload attributes, and other potentially harmful content.

This is useful when you are rendering SVGs from untrusted sources.

When set to false, the SVG will be rendered as-is. This is useful when you are rendering SVGs from trusted sources and you want to preserve all content.

Can be configred as a default parameter in your imgix source settings.