#34898 closed defect (bug) (fixed)
Responsive images broken on edited/imported content
Reported by: | kovshenin | Owned by: | kirasong |
---|---|---|---|
Milestone: | 4.4 | Priority: | highest omg bbq |
Severity: | blocker | Version: | 4.4 |
Component: | Media | Keywords: | has-patch |
Focuses: | Cc: |
Description
When we're rendering a srcset
for responsive images we're relying on the wp-image-*
class name, but the class name may not be consistent with attachment IDs when working with imported content or when editing the src
attribute manually. This can result in different images shown on different screen sizes or screen densities.
Attachments (3)
Change History (16)
This ticket was mentioned in Slack in #feature-respimg by kraft. View the logs.
9 years ago
This ticket was mentioned in Slack in #core by wonderboymusic. View the logs.
9 years ago
#5
@
9 years ago
- Keywords has-patch removed
We might be able to streamline things by moving this logic to wp_calculate_image_srcset()
, but the patch works and doesn't add any measurable performance overhead. We should add a unit test for this as well.
Note: See
TracTickets for help on using
tickets.
In 34898.diff: Bail if the original src is not in any of the image sizes.