[wp-trac] [WordPress Trac] #40565: SVG uploads broken in 4.6.5

WordPress Trac noreply at wordpress.org
Tue Apr 25 18:58:37 UTC 2017


#40565: SVG uploads broken in 4.6.5
--------------------------+-----------------------------
 Reporter:  homncruse     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Upload        |    Version:  4.6.4
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 (4.6.5 was not an option in the dropdown box -- admin, please reclassify)

 I am unable to upload SVG files in WordPress 4.6.5, despite explicitly
 allowing them in my theme as follows:

 {{{#!php
 <?php
 function add_svg_to_upload_mimes( $upload_mimes ) {
   $upload_mimes['svg'] = 'image/svg+xml';
   $upload_mimes['svgz'] = 'image/svg+xml';
   return $upload_mimes;
 }
 add_filter( 'upload_mimes', 'add_svg_to_upload_mimes', 10, 1 );
 }}}

 This bug seems to be identical to #39552 and fixed in r40124 (bug
 introduced to trunk in r39831, merged into 4.6 branch in r39833) for the
 4.7 branch, but the fix was not backported to the 4.6 branch.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40565>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list