[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:16:49 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 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?

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


More information about the wp-trac mailing list