[wp-trac] [WordPress Trac] #41884: Twenty Seventeen: responsive (gallery) images are too large
WordPress Trac
noreply at wordpress.org
Thu Sep 14 19:36:04 UTC 2017
#41884: Twenty Seventeen: responsive (gallery) images are too large
---------------------------+-----------------------------
Reporter: nosilver4u | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bundled Theme | Version: 4.8.1
Severity: normal | Keywords:
Focuses: |
---------------------------+-----------------------------
It seems the sizes attribute used for gallery images on the Twenty
Seventeen theme is a bit off. When viewed on the front page or an archive
page, instead of the selected thumbnail images (150px), the browser is
choosing the medium size at 600w, which I believe is based on the
"default" of 580px.
Even worse, when viewing a single post with a gallery, the "size"
attribute is 100vw, which means a 1080p screen forces the browser to load
the largest image available (1024w in my case).
I switched over to the Twenty Sixteen theme and it does not seem to have
this same problem.
I also tested this on another site, and initially it was only showing
thumbs (as expected). I compared the media settings, and realized the two
sites were different.
So there is one other thing that must be true to cause this behavior.
Under the Media settings, if you have the thumbnail cropping turned off,
this is the trigger.
So essentially, when the thumbs are 150x113 instead of 150x150, the Twenty
Seventeen theme adds all (or most of) the available sizes to the srcset
list because it fails to find an exact match to display in the gallery.
You can see it in action here: https://test.shanebishop.net/2017/06/23
/hello-world/
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41884>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list