Make WordPress Core

Opened 5 years ago

Last modified 5 years ago

#46470 new defect (bug)

Image srcset and sizes not output in classic block. Image attachment removed

Reported by: galbaras's profile 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.

Change History (2)

#1 @galbaras
5 years ago

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

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


5 years ago

Note: See TracTickets for help on using tickets.