Opened 22 months ago
Last modified 22 months ago
#58402 new defect (bug)
Featured Image Preview breaks when an SVG image is uploaded.
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Post Thumbnails | Keywords: | 2nd-opinion has-testing-info |
Focuses: | Cc: |
Description
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.
Attachments (1)
Note: See
TracTickets for help on using
tickets.
I have been able to reproduce this issue after adding a function to the functions.php file. By default, WordPress does not allow the uploading of SVG images, and only administrators can enable SVG uploads by adding a function to the functions.php file.
Therefore, I am wondering if this is indeed an issue in the core of WordPress and it should be addressed and fixed within the core itself.
Steps to Reproduce -