Hi there. Sorry to hear.
Might seem silly but can you please confirm you have the right SVG Support settings for allowing SVG uploads for your role?
If you do, please share what role your account has and what settings you’re using.
There was an update to the way rest api uploads are handled which shouldn’t affect regular media library uploads in admin.
-
This reply was modified 2 months, 1 week ago by
Benbodhi. Reason: fixed autocorrect to say shouldn’t instead of should
I’m using:
Restrict SVG Uploads to? Administrator
Do not sanitize for these roles Administrator Editor
I’m not seeing any issues uploading to the media library with the same settings. (Note that the sanitization bypass for editor role won’t work since editors can’t upload unless selected in the allowed roles field above).
If you’re logged in as admin, and have admin selected in allowed roles, you should be fine to upload SVG files regardless of the sanitization bypass for admin option.
I’ve just tested and can’t reproduce your issue. If you could please share as much info as possible, like server setup, php version, and the SVG file itself, I’ll be happy to keep trying to reproduce the issue.
Also might be worth testing with all other plugins deactivated in case it’s a plugin conflict somewhere.
I’ve tried with different svg files. On upload the image briefly appears but greyed out, then the block reverts to the upload image block and I get the error msg. Here’s server setup:
Server architectureLinux 4.18.0-513.24.1.lve.el8.x86_64 x86_64
Web serverLiteSpeed
PHP version7.4.33 (Supports 64bit values)
PHP SAPIlitespeedPHP max input variables8000
PHP time limit360P
HP memory limit512M
Max input time240
Upload max filesize256M
PHP post max size256
McURL version8.11.0 OpenSSL/1.1.1w
Is SUHOSIN installed?No
Is the Imagick library available?Yes
Are pretty permalinks supported?Yes.
htaccess rulesCustom rules have been added to your .htaccess file.
ok I found the issue. apparently when an SVG file doesn’t have an XML tag at the start, php 8 will return mime type with svg+xml still so it works fine, but php 7.4 returns only svg which my filtering was not checking for.
I’ve adjusted the check to support svg+xml as well as svg on its own in v 2.5.12 which you can update to now and check for yourself to be sure.
Let me know if you still see issues.
It’s probably worth updating to php 8+ these days, but this was a good catch to make sure it works in older versions.
Thanks, all works good now!
That’s great news! Thanks for letting me know.
Would be awesome if you could take a minute to leave a review of the plugin 🙏