Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #63294, comment 7


Ignore:
Timestamp:
04/18/2025 07:18:52 AM (19 months ago)
Author:
nsladen

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #63294, comment 7

    initial v1  
    11+1 for this. I use the REST API to upload SVG images to the media library and this 100% broke after upgrading my site to 6.8.
     2
     3The suggested workaround above works for me and SVG upload works again. Thanks @QuietNoise!
     4
     5
     6{{{
     7add_filter( 'wp_prevent_unsupported_mime_type_uploads', function( $prevent_upload, $mime_type ) {
     8    if ( 'image/svg+xml' === $mime_type ) {
     9        return false;
     10    }
     11    return $prevent_upload;
     12
     13}, 10, 2 );
     14}}}