Hello!

My team and I have recently begun the changeover to Core Media on all of our sites, and are weighing our options as it relates to handling SVGs. I notice quite a few SVG modules with various separation of concerns (e.g. some provide media sources, some provide formatters, some alter image fields to accept SVGs, some sanitize, etc. etc.).

As this module seems to follow the best practice of cleaning the SVG on render instead of upload, I'm curious if you are open to also providing the media source (a la https://www.drupal.org/project/svg_image_field), as this would prevent the need for multiple modules. Just curious if there was a reason for the separation of concerns, and if not I'm more than happy to work on adding the media source to this module as well :D

Thanks!

CommentFileSizeAuthor
#6 3093344-sanitise-svgs.patch732 byteshenrijs.seso
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

afireintheattic created an issue. See original summary.

larowlan’s picture

Status: Active » Needs review

Yes, this module works with SVG icon which has a media source provider

henrijs.seso’s picture

Title: Open to adding a media source/provider? » Add compability with `svg_image_field` module
Status: Needs review » Active

Let's start with svg_image_field module.

henrijs.seso’s picture

Title: Add compability with `svg_image_field` module » Add compability with svg_image_field module
henrijs.seso’s picture

StatusFileSize
new732 bytes

Do we need to upload patch files?

larowlan’s picture

Status: Active » Fixed

Because that field-type extends from FileItem, I feel this should be fairly compatible.
Let's get this in and deal with any issues in a followup.

I've put this out as a 2.0.0, starting on the semver train

larowlan’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.