[wp-trac] [WordPress Trac] #58402: Featured Image Preview breaks when an SVG image is uploaded.

WordPress Trac noreply at wordpress.org
Thu May 25 09:26:43 UTC 2023


#58402: Featured Image Preview breaks when an SVG image is uploaded.
-----------------------------+-----------------------------
 Reporter:  deepakvijayan    |      Owner:  (none)
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Post Thumbnails  |    Version:
 Severity:  normal           |   Keywords:
  Focuses:                   |
-----------------------------+-----------------------------
 Steps to reproduce.

 Add a new post - set a featured image. Use an **SVG** as the featured
 image.
 The layout breaks inside **InspectorControls**

 It seems to be because the image tag returns 0 as its
 naturalWidth/naturalHeight.

 Reference for what seems to be the issue with SVG.
 https://bugzilla.mozilla.org/show_bug.cgi?id=1607081

 **Note**: This can only be reproduced if, SVG image upload is enabled via
 functions.php. Since by default, WordPress doesn’t allow SVG upload.

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


More information about the wp-trac mailing list