Opened 6 years ago
Last modified 6 years ago
#46470 new defect (bug)
Image srcset and sizes not output in classic block. Image attachment removed
Reported by: | galbaras | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 5.1 |
Component: | Media | Keywords: | |
Focuses: | Cc: |
Description
I installed the Gutenberg plugin on one of my sites, which was eventually updated to WP 5.0.3 and then WP 5.1. In all that time, most of the content remained unchanged.
Looking at it now, most of the images in the library are unattached and embedded images produce the old/simple "IMG" tag, with no "srcset" or "sizes" attributes.
I've tried attaching images in the media library. No change.
I've tried setting $content_width. No change.
Than only thing that makes any difference is editing the post/page, removing the embedded image and simply embedding it again. In the editor's HTML view, the respective "IMG" tag looks almost identical, except possibly the order of attributes.
When converting tinyMCE content to blocks, WordPress should convert all of the required metadata, but seems like it doesn't.
I've also tried "convert to blocks". No change :(