[wp-trac] [WordPress Trac] #39552: SVG upload support broken in 4.7.1

WordPress Trac noreply at wordpress.org
Fri Jan 13 22:43:32 UTC 2017


#39552: SVG upload support broken in 4.7.1
----------------------------------------+--------------------
 Reporter:  freakpants                  |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  4.7.2
Component:  Upload                      |     Version:  trunk
 Severity:  normal                      |  Resolution:
 Keywords:  needs-unit-tests has-patch  |     Focuses:
----------------------------------------+--------------------

Comment (by room34):

 Since (as I understand it) the core team has decided not to allow SVG
 uploads by default, be sure not to add SVG to the returned arrays of
 wp_get_mime_types() or wp_get_ext_types().

 I think the best solution would take @freakpants' approach: it should be
 self-contained within the new wp_get_image_mime() function and just make
 that function capable of returning "image/svg+xml" when appropriate,
 instead of false.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39552#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list