[wp-trac] [WordPress Trac] #56950: The default margin for .wp-block-image disappears after WordPress 6.1

WordPress Trac noreply at wordpress.org
Mon Nov 7 11:40:10 UTC 2022


#56950: The default margin for .wp-block-image disappears after WordPress 6.1
-------------------------------+------------------------------
 Reporter:  winandarreza       |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Editor             |     Version:  6.1
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------

Comment (by winandarreza):

 Replying to [comment:4 poena]:
 > Hi!
 >
 > If you look at https://escapiso.com/things-to-do-indonesia/,
 > the first image which has the margin is created with:
 >
 > {{{
 > <figure class="wp-block-image size-full"><img decoding="async"
 width="960" height="540" src=""></figure>
 > }}}
 >
 > While the images below uses an extra div:
 >
 > {{{
 > <div class="wp-block-image">
 > <figure class="aligncenter size-full"><img decoding="async"
 loading="lazy" width="640" height="360" src=""></figure></div>
 > }}}
 >
 > This div that was used around the centered image block was removed in
 WordPress 6.0.
 > The {{{.wp-block-image}}} is now placed on the figure element.
 >
 > Can you test if resaving the post removes the div and if that solves the
 issue?

 The first image was inserted into the post when the post was published,
 which is March 4th, 2022, before WordPress 6.0.

 While the latter images were inserted into the post after WordPress 6.0.

 And unfortunately no, I updated the post and the issue still persists.

 **However**, when I switched to the Twenty Twenty-Two and Twenty Twenty-
 Three themes, the issue is fixed.

 So, I guess this is a theme problem? Should I report to StudioPress to let
 them know that their theme needs updating to comply with 6.1?

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


More information about the wp-trac mailing list