[wp-trac] [WordPress Trac] #63714: Missing width/height attributes on SVG file since WP 6.8.2
WordPress Trac
noreply at wordpress.org
Tue Jul 22 12:09:55 UTC 2025
#63714: Missing width/height attributes on SVG file since WP 6.8.2
--------------------------+---------------------
Reporter: rainbowgeek | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.8.3
Component: Media | Version: 6.8.2
Severity: major | Resolution:
Keywords: | Focuses:
--------------------------+---------------------
Comment (by heybran):
We had same issue in some of the sites we're trying to update today. Still
trying to see if we can find a way to work around this, meaning to get the
width and height attributes back on SVG logos without rolling back to
WordPress 6.8.1.
We're rendering the SVG images with `wp_get_attachment_image()` call.
{{{
echo wp_get_attachment_image(
$logo,
'logo-235x40',
false,
array(
'alt' => esc_attr( get_bloginfo( 'name' ) . ' - ' .
get_bloginfo( 'description' ) ),
'height' => '40',
'width' => '235',
)
);
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63714#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list