[wp-trac] [WordPress Trac] #54192: `get_header_image_tag` doesn't add `srcset`/`sizes`

WordPress Trac noreply at wordpress.org
Mon Sep 27 16:38:57 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        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Currently the `get_header_image_tag` method (and all other methods calling
 it like `the_custom_header_markup` and `get_custom_header_markup`) outputs
 an `<img>` without `srcset` and `sizes` attributes.

 This is important for header images that are normally quite large.

 The custom header image method doesn't use the normal WordPress
 `wp_get_attachment_image` method for outputting the actual `<img>`,
 instead it constructs the `<img>` markup with its own code.


 Related issue: https://core.trac.wordpress.org/ticket/46134#comment:6

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54192>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list