Enable SVG Support on the Drupal Media Library.
Install “Svg Image” and enable “SVG Image”. There’s no need to enable “SVG Image Responsive” unless you have a reason of course.
Allow SVG’s as a media type
- Go to: <siteurl>/admin/structure/media
- On Image, dropdown the edit menu and select “Manage Fields”
- Image [Edit]
- Add “svg” to the list of “Allowed file extensions”
Requires Drupal Media Library extension.