[wp-trac] [WordPress Trac] #62530: Inline SVG Images Cannot Be Sized

WordPress Trac noreply at wordpress.org
Tue Dec 10 12:58:07 UTC 2024


#62530: Inline SVG Images Cannot Be Sized
--------------------------+------------------------------
 Reporter:  timsinclair   |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:  6.7.1
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+------------------------------

Comment (by wpschorsch):

 In WordPress 6.6, the following code correctly displayed an embedded SVG:


 {{{
 <div class="wp-block-column is-layout-flow wp-block-column-is-layout-
 flow">
   <figure class="wp-block-image size-large">
     <a href="">
       <img decoding="async" src="https://URL/files/2022/02/SVG.svg" alt=""
 class="wp-image-xxx">
     </a>
   </figure>
 </div>
 }}}


 After updating to WordPress 6.7, the SVG now has a width and height of 0.
 This issue occurs even on existing pages that were not modified after the
 update.

 Environment:

     WordPress: 6.7.1
     Server: Apache 2.4
     PHP: 8.3
     Theme: Blocksy

 Since this issue affects existing content, it seems to stem from a change
 in core processing introduced in 6.7. I hope this information helps narrow
 down the cause!

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


More information about the wp-trac mailing list