WordPress.org

Make WordPress Core

Opened 3 months ago

Closed 3 months ago

#53464 closed defect (bug) (fixed)

Source sets not adding to images in block based widgets

Reported by: spacedmonkey Owned by: flixos90
Milestone: 5.8 Priority: normal
Severity: normal Version: 5.8
Component: Widgets Keywords: has-patch commit
Focuses: Cc:

Description

Similar to #53463. If I insert an image or paragraph / custom html ( that contains html for an image ), in the new block based widget screen, the generated image on the front end does contain the srcset / sizes attributes. See attached screenshot.

Attachments (1)

Screenshot 2021-06-20 at 15.44.19.png (210.5 KB) - added by spacedmonkey 3 months ago.

Download all attachments as: .zip

Change History (6)

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


3 months ago

#2 @spacedmonkey
3 months ago

  • Keywords has-patch added; needs-patch removed

There is a patch that will fix this and #53463 at https://github.com/WordPress/wordpress-develop/pull/1404

#3 @daisyo
3 months ago

Confirmed that the issue is present and tested the patch. Works as expected.
Markup Before:
https://d.pr/i/nIRRgg
Markup After
https://d.pr/i/sim5Yf

#4 @flixos90
3 months ago

  • Keywords commit added
  • Owner set to flixos90
  • Status changed from new to reviewing

Via https://core.trac.wordpress.org/ticket/53463#comment:8, the patch that covers this ticket as well is good to go.

#5 @flixos90
3 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 51207:

Media: Add lazy-loading support to block-based widgets.

This changeset adds the wp_filter_content_tags() function as a filter to widget_block_content.

Props spacedmonkey, walbo, daisyo.
Fixes #53463, #53464.

Note: See TracTickets for help on using tickets.