Problem/Motivation

SVGs are not yet supported, but because they are code, come with their own challenges.

Steps to reproduce

Proposed resolution

We need to come to a decision if we are going to support SVGs and if so, what security risks this enables and what we will do to mitigate those.

See security conversation here.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

KeyboardCowboy created an issue. See original summary.

skaught’s picture

https://www.drupal.org/project/svg_image
discovery: 'SVG Image' does not attempt to apply an image style to an SVG, it recognizes that is can not and only renders an IMG tag with a sanitized file that it makes during file upload phase. if 'field' using SVG type the imagecache preset is simply not run 'if file is SVG'.
-this is where an SVG would then be 'sanitized' and the user would need to very the image still 'works as expected' (given they may not have any knowledge of this sanitization does..).
#3244673: Sanitizer breaks animated SVGs. this solution is to add an option to bypass sanitize under the idea that 'user already has own responsibility'
-There is a lack of clarity that PHP (GD Library) can not scale from vector. if SVG contains sized html text (ie: SVG isn not 100% path based) mathematical scaling wouldn't be likely to produce a 'good graphic'
- SVG's as they are seen to have a natural ability to 'scale (css transform?)' vs Responsive (by breakpoint) sizing.

ckrina’s picture

Project: Navigation » Drupal core
Version: 1.x-dev » 11.x-dev
Component: Code » navigation.module
aaronmchale’s picture

plopesc’s picture

Status: Active » Closed (outdated)

SVGs for the Nav Icon approach was already discussed and implemented in #3425080: Add a UI option to change or hide the logo on the Toolbar and related subsequent follow-ups.

1st level icons have been implemented thanks to Icon API, #3516887: Allow to customize Navigation icons, #3517081: Integrate UI Icons Menu with Navigation and related follow-ups.

From my POV, I think it is safe to close this issue and mark is as outdated.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.