[wp-trac] [WordPress Trac] #37141: SVG image used as featured images set to 0px by 0px

WordPress Trac noreply at wordpress.org
Tue Jun 21 22:02:21 UTC 2016


#37141: SVG image used as featured images set to 0px by 0px
--------------------------+-------------------------
 Reporter:  theMikeD      |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Media         |     Version:  4.5.2
 Severity:  normal        |  Resolution:  maybelater
 Keywords:                |     Focuses:
--------------------------+-------------------------
Changes (by joemcgill):

 * status:  new => closed
 * resolution:   => maybelater
 * milestone:  Awaiting Review =>


Comment:

 Hi @theMikeD,

 Thanks for the report. WordPress doesn't currently support uploading SVG
 files natively to the media library due to security concerns over allowing
 users to upload XML (see #24251). For that reason, I don't think this is a
 bug core necessarily needs to fix for now.

 However, in the mean time I would suggest filtering the output of the
 image markup for featured images using the `post_thumbnail_html` filter to
 strip off the height and width attributes if needed (or to modify them to
 your liking).

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


More information about the wp-trac mailing list