I wrote up a small tutorial on how to get SVG Image Field working with Media Library on Stack Exchange here.

However, there is one small missing piece to get the SVG as Media source working with core Media module + Media Library.

The media library pop-up is missing a file upload form on the "SVG" tab.

I realize Media Library is still experimental in Drupal 8.7, however all signs point to this module being vetted and made official.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jwilson3 created an issue. See original summary.

jwilson3’s picture

Status: Active » Needs review
FileSize
2.1 KB

This patch adds the missing pieces to get the SVG upload form working in the Media Library popup dialog, and to format the SVG field inside the media library.

Note: you should format your SVG field formatter on the Manage Form Display for the Media Library to have a width of 220 pixels, and an undefined height, and do not use the inline SVG formatter option.

jwilson3’s picture

This needs work. The second step after uploading the image shows a broken preview image.

jwilson3’s picture

Issue summary: View changes

I've written up a small tutorial on how to get SVG Image Field working with Media Library on Stack Exchange here.

kclarkson’s picture

@jwislon,

Is it possible to add your instructions into the README?

Thank you so much for making this happen!

scottsawyer’s picture

Status: Needs review » Reviewed & tested by the community

I've been using this patch for quite a while now, would love to see it committed.

srjosh’s picture

+1 RTBC

srjosh’s picture

+1 RTBC (except would like to see README as well)

mandclu’s picture

I created #3175769: Update README with steps to use with Media Library as a child issue to get the README updated

jwilson3’s picture

Patch added to the docs update issue, pls review!

mandclu’s picture

Status: Reviewed & tested by the community » Fixed

Merged this into a new 2.0.x branch, so we can have a beta release for this and other new features.

Status: Fixed » Closed (fixed)

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

Eric_A’s picture

Rerolled #2 by @jwilson3 for those seeking to cleanly patch the 8.x-1.3 release, not yet moving to 2.0.0-rc1. (Again for the info.yml dist file, not for the source file.)