Closed
Description
This is a feature request.
There's a plugin for minifying IDs but this is basically useless when inlining SVGs in HTML because it is guaranteed to cause problems (i.e. when inlining at least two SVGs that contain IDs you're guaranteed to have a conflict on ID "a").
It would be very useful if SVGO allowed prefixing IDs with a configurable key. This would allow tooling like react-svg-loader
to generate a unique prefix and pass it to SVGO to guarantee the IDs don't break when the SVGs are inlined.
A problem is that the IDs can be referenced with xlink:href
attributes and url()
values but this is already addressed by the cleanupIDs
plugin.
Metadata
Assignees
Labels
No labels
Activity