[wp-trac] [WordPress Trac] #54192: `get_header_image_tag` doesn't add `srcset`/`sizes`
WordPress Trac
noreply at wordpress.org
Mon Sep 27 20:57:03 UTC 2021
#54192: `get_header_image_tag` doesn't add `srcset`/`sizes`
--------------------------+------------------------------
Reporter: strarsis | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by joyously):
Let me amend my statement. For post content, the `srcset` and `sizes` are
added later, by `wp_filter_content_tags()`.
The `get_header_image_tag()` function adds the attributes itself, just
below where you referenced. Does your test case meet the condition?
`if ( empty( $attr['srcset'] ) && ! empty( $header->attachment_id ) ) `
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54192#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list