[wp-trac] [WordPress Trac] #54192: `get_header_image_tag` doesn't add `srcset`/`sizes`
WordPress Trac
noreply at wordpress.org
Tue Oct 5 14:12:31 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: reporter-feedback | Focuses:
-------------------------------+------------------------------
Changes (by hellofromTonya):
* keywords: => reporter-feedback
Comment:
Hello @strarsis,
Welcome back to Core's Trac! Thank you for the ticket.
Replying to [comment:4 strarsis]:
> Good point. The test case would meet the condition, as `$attr` doesn't
contain `srcset` and by default `srcset` is not added to `$attr`.
Does this resolve the ticket and your test case? Or is it still not
generating the `srcset` and `size`?
If the problem remains, check the `_wp_attachment_metadata` for the
attachment (see the code on about L1226. Is it an array? If no, then the
generation is skipped.
If it is an array and the generation is not happening, please share step-
by-step instructions including any code or attachments for contributors to
reproduce the problem. This type of information helps contributors to
investigate.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54192#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list