WordPress SVG Support: How to Enable SVGs in WordPress


Vector images are becoming increasingly common on the web. SVGs provide a scalable, responsive and fast alternative to standard images with the primary benefit being that they look crisp and sharp across any device and they are typically smaller in file size. Cross-browser support is also now comprehensive, with all modern browsers supporting SVGs when used with the image tag or in CSS as part of the background property.
If you’re using WordPress, you’re probably familiar with the Media Library and how it works as a central repository for your media assets. The manager which handles uploading of files is initially restricted to a listing of approved file types.
Today’s tutorial will focus on how we can add SVG media support and also improve WordPress’ processing, handling and display of SVGs overall.
Backstory – Why No SVG Support in WordPress?
You’re probably wondering why SVGs never made it onto the list of supported file types in WordPress, the answer is entirely about security.
SVGs are not raster images like other formats (such as png, jpg, gif), they are actually vectors and because of that they can potentially be used to carry malicious JavaScript.
Source: https://managewp.org/articles/13529/wordpress-svg-support-how-to-enable-svgs-in-wordpress




source https://williechiu40.wordpress.com/2016/10/04/wordpress-svg-support-how-to-enable-svgs-in-wordpress/