Closed aaronrussell closed 7 years ago
@aaronrussell it's a shame that this makes it impossible to preview an SVG in the admin at all. Perhaps the original SVG could just be used? (i.e. no thumbnail at all)
Perhaps as well, the "File name" field when you view an asset could be a link which allows you to see the original asset.
@jonleighton yeah SVGs are a little bit awkward here. In this scenario I only want a small thumbnail, so if we used the original SVG it would most of the time be stretched/squahshed. Also wouldn't want to use the original file if it was a large file. I agree it's not ideal though.
As for the linking to a preview somehow - yes agreed. Irrespective of whether it's a SVG this would be useful. I'm working on a redesign of the admin UI so will definitely try to address that one 👍
I tried replacing the img
src
attribute via developer tools and it seemed to squash the image to size without distortion. I can see that this could be problematic with large files, though. Maybe it would be possible to look at the SVG file size to decide whether to display it (although I'm not sure how much file size is related to rendering complexity...)
From @mat2maa