WordPress.org

Make WordPress Core

Opened 7 months ago

Last modified 7 months 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:
PR Number:

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.

Change History (2)

#1 @galbaras
7 months ago

I've also tried "convert to blocks". No change :(

This ticket was mentioned in Slack in #core-media by desrosj. View the logs.


7 months ago

Note: See TracTickets for help on using tickets.