SVG
SVG holds one SVG file, for icons and logos that must stay sharp at any size.
WordPress doesn't normally allow SVG uploads, because an SVG is a document that can contain scripts. VX allows them through this field, and makes them safe by rewriting each file as it's uploaded.
What gets removed
The cleaned file keeps shapes, paths, text, gradients and safe presentation attributes such as fill and stroke. It removes:
- scripts and event handlers such as
onclick <style>blocks andstyleattributes- embedded images and links
- animation elements
Most icons come through unchanged. An illustration exported with embedded CSS may lose its styling. If that happens, export it again with presentation attributes instead of CSS; most design tools have that option.
Warning
A file that can't be read as valid SVG markup, including one with an XML DOCTYPE, is refused and the upload fails.
Only new uploads are cleaned. SVGs that were already in the media library before are left as they are.
SVG images aren't resized, so the image size settings don't apply.
Technical details for LLMs
- Type key:
svg. Shares the media upload settings; no derivatives. - Stored: attachment id. Uploads are sanitized server-side (allowlist of elements/attributes);
DOCTYPEor unparseable markup is rejected. Existing attachments aren't re-sanitized. - The dashboard serves an attachment's cleaned SVG markup at
vx-framework/v1/attachments/{id}/svg.