[wp-trac] [WordPress Trac] #59256: Twenty Twenty-Two: Header image missing dimension attributes

WordPress Trac noreply at wordpress.org
Thu Aug 31 16:52:33 UTC 2023


#59256: Twenty Twenty-Two: Header image missing dimension attributes
-------------------------------------------------+-------------------------
 Reporter:  flixos90                             |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  6.4
Component:  Bundled Theme                        |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-testing-info needs-    |     Focuses:
  testing                                        |  performance
-------------------------------------------------+-------------------------
Changes (by flixos90):

 * keywords:  has-patch => has-patch has-testing-info needs-testing


Comment:

 = Testing instructions =

 1. Activate Twenty Twenty-Two on a fresh install.
 2. Visit the home page and inspect the header image element (the image of
 the bird). Note that it has neither `loading="lazy"` nor
 `fetchpriority="high"` present, due to furthermore lacking the `width` and
 `height` attributes.
 3. Apply the PR https://github.com/WordPress/wordpress-develop/pull/5124
 to your site.
 4. Refresh the home page and inspect the image again. Now it should have
 `width` and `height` attributes present, which also allows it to receive
 `loading="lazy"` or `fetchpriority="high"` through WordPress core's image
 optimization logic. On a fresh install, the image should have
 `fetchpriority="high"` applied, since it's the largest image in the
 header.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59256#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list