Broken images after importing posts and opening in Gutenberg

Question

I imported posts from a wordpress.com site into my Woocommerce site, and some have broken images.

When I open the post to edit, the Gallery in the post is converted to Gutenberg blocks.

Not all the images are converted correctly. Some are okay, and have HTML code that looks like this:

<!-- wp:image {"id":1935,"linkDestination":"attachment"} -->
<figure class="wp-block-image"><a href="https://zombiesoftheinformationsociety.com/dehoarding-japanese-american-and-asian-1960s-ephemera-first-lot/img_2083/"><img src="https://zombiesoftheinformationsociety.com/wp-content/uploads/2017/07/img_2083.jpg" alt="" class="wp-image-1935"/></a></figure>
<!-- /wp:image -->

Some look like this, and are broken:

<!-- wp:image {"id":1936,"linkDestination":"attachment"} -->
<figure class="wp-block-image"><img alt="" class="wp-image-1936"/></figure>
<!-- /wp:image -->

Some look like this, and are broken:

<!-- wp:image {"id":1922,"linkDestination":"attachment"} -->
<figure class="wp-block-image"><a href="https://zombiesoftheinformationsociety.com/dehoarding-japanese-american-and-asian-1960s-ephemera-first-lot/img_2066/"><img alt="" class="wp-image-1922"/></a></figure>
<!-- /wp:image -->

So, it looks like the conversion process rewrites the code, and it must be getting some of the attributes from somewhere, maybe the server.

The good news is that these images are present in the Media Library, and are attached to the post.

I’m wondering if there’s a tool that will fix the HTML, creating the A tag and IMG tag correctly?

0
John Kawakami 3 weeks 2022-09-04T03:46:08-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse