Closed srtfisher closed 3 months ago
Nested images are not properly being converted to Gutenberg image blocks. This includes images wrapped in a <figure> tag and/or a <a> tag.
<figure>
<a>
<figure class="wp-block-image size-large"><a href="https://alley.com/wp-content/uploads/2022/01/Screen-Shot-2022-01-19-at-2.51.37-PM.png"><img decoding="async" loading="lazy" width="786" height="672" src="https://alley.com/wp-content/uploads/2022/01/Screen-Shot-2022-01-19-at-2.51.37-PM.png?w=786" alt="" class="wp-image-5962"></a></figure>
OR even
<a href="https://alley.com/wp-content/uploads/2022/01/Screen-Shot-2022-01-19-at-2.51.37-PM.png"><img decoding="async" loading="lazy" width="786" height="672" src="https://alley.com/wp-content/uploads/2022/01/Screen-Shot-2022-01-19-at-2.51.37-PM.png?w=786" alt="" class="wp-image-5962"></a>
<!-- wp:html --><figure class="wp-block-image size-large"><a href="https://alley.com/wp-content/uploads/2022/01/Screen-Shot-2022-01-19-at-2.51.37-PM.png"><img decoding="async" loading="lazy" width="786" height="672" src="https://alley.com/wp-content/uploads/2022/01/Screen-Shot-2022-01-19-at-2.51.37-PM.png?w=786" alt="" class="wp-image-5962"></a></figure><!-- /wp:html -->
I would also expect that the image would be downloaded to the media library and it was not.
Even if the block won't be converted to a image block it should have the image downloaded to the media library and not reference an external file.
Description of the bug
Nested images are not properly being converted to Gutenberg image blocks. This includes images wrapped in a
<figure>
tag and/or a<a>
tag.Steps To Reproduce
OR even
I would also expect that the image would be downloaded to the media library and it was not.
Additional Information
Even if the block won't be converted to a image block it should have the image downloaded to the media library and not reference an external file.