awesomemotive / file-upload-types

Manage the types of files that can be uploaded to your WordPress site.
https://wordpress.org/plugins/file-upload-types/
6 stars 2 forks source link

SVG thumbnails not visible in list view in the WP media library #68

Open kennymacharia opened 1 year ago

kennymacharia commented 1 year ago

A user on the WordPress.Org reported that SVG thumbnails are not visible in the media library in the list view. I was able to reproduce the issue: List view: https://a.supportally.com/i/ZDc9b2 Grid view: https://a.supportally.com/i/wB1z98

They also mentioned that this issue was happening on PHP 7.4 and reported an upload problem on the same version of PHP but I'm unable to reproduce the upload error on my end.

The list view seems to work as expected when using other plugins such as: https://wordpress.org/plugins/safe-svg/ https://wordpress.org/plugins/svg-support/ https://wordpress.org/plugins/easy-svg/

Environment:

PHP Version: 8.1.9 File Upload Types: 1.3.0 WP: 6.2

kkarpieszuk commented 1 year ago

@kennymacharia thanks for handling this.

Does it concerns every size of SVG file? Could you share example svg file which does not render preview (and example of one which renders it correctly in case it would happen)

I want to double check: it is not rendered only on list view, but on grid view it is correct, yes?

what mime type has user set in FUT plugin for SVG file?

kennymacharia commented 1 year ago

Hi @kkarpieszuk

The issue seems to affect all SVGs but here is one example from the customer: https://www.sendspace.com/file/hsfg1o In order to reproduce the issue, you need to use older PHP versions such as 7.3. I'm using the default SVG MIME type: https://a.supportally.com/i/iaEYck

kkarpieszuk commented 1 year ago

Thanks. what about the view? Is it not displayed only in list view or also on grid view?

kennymacharia commented 1 year ago

The grid view works but not the list view. List view: https://a.supportally.com/i/ZDc9b2 Grid view: https://a.supportally.com/i/wB1z98