[wp-trac] [WordPress Trac] #64346: SVG Image dimensions overwritten to hardcoded 24 pixels
WordPress Trac
noreply at wordpress.org
Fri Dec 5 00:03:13 UTC 2025
#64346: SVG Image dimensions overwritten to hardcoded 24 pixels
--------------------------+------------------------------
Reporter: ajayadav09 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 6.9
Severity: normal | Resolution:
Keywords: close | Focuses:
--------------------------+------------------------------
Changes (by westonruter):
* keywords: => close
Comment:
This is probably something that would be better reported to the Gutenberg
repo, because that's where this package is maintained.
In any case, take a look at the docs for the `Icon` component:
https://github.com/WordPress/gutenberg/tree/trunk/packages/components/src/icon
The `size` prop's default value is defined as:
> Defaults to 20 when icon is a string (i.e. a Dashicon id), otherwise 24.
Since you're passing in a component, it makes sense that you'd be seeing a
size of 24x24.
In other words, it does not read the size from the SVG. You'll need to
supply the size yourself.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64346#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list