SVG images get width and height attributes with values 1
|Reported by:||lippe||Owned by:|
Even though SVG files are not supported by core, it's rather easy (and might be common?) to allow them to be uploaded by filtering the 'mime_types' hook or using the ALLOW_UNFILTERED_UPLOADS.
However, on some places throughout WP admin, uploaded SVG images aren't displayed correctly due to width and height attributes being set to 1 for the <img> tag. The places I've found this error so far is in the Media admin table and the Featured Image metabox.
Removing the width and height attributes (using the Chrome inspector) displays the images correctly, as far as I can tell.