[wp-trac] [WordPress Trac] #41884: Twenty Seventeen: responsive (gallery) images are too large

WordPress Trac noreply at wordpress.org
Mon Jun 3 23:10:30 UTC 2019


#41884: Twenty Seventeen: responsive (gallery) images are too large
---------------------------+---------------------
 Reporter:  nosilver4u     |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  5.3
Component:  Bundled Theme  |     Version:  4.8.1
 Severity:  normal         |  Resolution:
 Keywords:  needs-patch    |     Focuses:
---------------------------+---------------------
Changes (by azaozz):

 * keywords:   => needs-patch
 * milestone:  Awaiting Review => 5.3


Comment:

 Just noticed the same thing happening on the Media screen in wp-admin,
 list view. The browser downloads the "large" size for all thumbnails
 despite that they are 60x60px. Caused by the `sizes` attribute being
 overwritten here: https://core.trac.wordpress.org/browser/tags/5.2.1/src
 /wp-content/themes/twentyseventeen/functions.php#L562 to always be
 `100vw`, i.e. all images should be as wide as the window...

 This can easily be fixed by adding `! is_admin()` at the beginning in
 `twentyseventeen_post_thumbnail_sizes_attr()` but thinking it is pretty
 unusual to set all responsive images *everywhere* to be `100vw` except
 when some templates are used. If this is intended only for post
 thumbnails, it should be restricted only to them :)

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


More information about the wp-trac mailing list