• Resolved Aslan French

    (@thedonquixotic)


    Context: I’m developing a website using React and WordPress as a headless CMS using the REST API.

    I’m currently piping content data from my old blog: [ redundant link removed ]

    I am noticing some inconsistencies between posts. Some of these posts were written wright after Gutenberg came out and some were written much later.

    On earlier posts I see <figure class="wp-image-block"> but on newer posts I see <div class="wp-image-block"> <figure>

    Has there been a change to the image block and if so, why?

    • This topic was modified 5 years, 4 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi there!

    I tested this out on the latest version and when I use the Image Block I see <figure class="wp-block-image"> in the Code Editor. Are you able to reproduce this with all plugins disabled and a default theme active?

    Thread Starter Aslan French

    (@thedonquixotic)

    @rwaynick Yes. I am starting with a brand new WP on AWS bitnami instance with default twentynintenteen theme running.

    I have actually tracked down the source of the change in markup though and why it was changed. See github pull request and the discussion I’ve had with the dev who made the change there: https://github.com/WordPress/gutenberg/pull/7721

    If you’re getting image block without the wrapper block that is probably the case of a center aligned or full width block. The wrapper block gets applied when blocks are loated left or right with alignright/left.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Changes to Gutenberg wp-image-block?’ is closed to new replies.