-
Notifications
You must be signed in to change notification settings - Fork 28
Don't download images which will be downscaled by a factor of more than N. #40
Comments
If memory serves, @samdutton looked into this before and might have some data. Alternatively, we can instrument HTTP Archive to pull this on next crawl. |
Hi Ilya
Just responded to Paul Irish about this in a chat this morning.
I haven't built anything to check for image bloat — at least, not that I
remember ;).
I was considering something for Lighthouse, after looking at a number of
sites in different regions recently that are very successful in terms of
MAUs, but have unnecessarily large image payload sizes because of excessive
pixel dimensions, lack of compression, non-use of responsive techniques,
etc.
A while back I did build an extension that checks for incorrectly sized
(and single pixel) images:
https://chrome.google.com/webstore/detail/image-checker/bacnicogfgpigmmenfiplfiofpkocpii?hl=en-GB
Regards
Sam
…On 14 December 2016 at 23:27, Ilya Grigorik ***@***.***> wrote:
If memory serves, @samdutton <https://github.com/samdutton> looked into
this before and might have some data.
Alternatively, we can instrument HTTP Archive to pull this on next crawl.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#40 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAMhqgkN1U-TKSsi__GA72Hq3tohu2r9ks5rIHtJgaJpZM4LNPqW>
.
|
Ah, right, that's what I was thinking of.. thanks :) |
Instrumenting http archive seems like a reasonable approach. Who is the right person to drive that? |
I think this is a lovely idea. |
@rviscomi I believe we now have this data in HA as part of LH audits? |
@igrigorik yes the
It's currently available in the 6/1 and 6/15 |
Taking a quick stab at this: SELECT
NTH(251, QUANTILES(CAST(JSON_EXTRACT_SCALAR(lighthouse, "$.audits['uses-responsive-images'].score") AS FLOAT), 1001)) AS p25,
NTH(501, QUANTILES(CAST(JSON_EXTRACT_SCALAR(lighthouse, "$.audits['uses-responsive-images'].score") AS FLOAT), 1001)) AS p50,
NTH(751, QUANTILES(CAST(JSON_EXTRACT_SCALAR(lighthouse, "$.audits['uses-responsive-images'].score") AS FLOAT), 1001)) AS p75,
AVG(JSON_EXTRACT(lighthouse, "$.audits['uses-responsive-images'].score")) AS avg
FROM
[httparchive:har.2017_06_15_android_pages]
WHERE
lighthouse != 'null'
|
(As noted in #72, we intend to archive this repository and are thus triaging and resolving all open issues) I think having this in Lighthouse is a great idea, In addition to that there's a proposed oversized-images policy which could help as well. However, it doesn't seem like there's active development on it at the moment. Restarting that effort (potentially as a separate WICG proposal) seems like the most promising way forward. In the meantime, I think it's safe to close this issue. |
It's fairly common that pages have massive images which are downscaled before being displayed (citation needed).
We often don't need to download much of an image before we know it's size. If we know that an image is way bigger than its display size, we could refuse to download the rest of it.
This would encourage the ecosystem to stop serving giant images, and would decrease the amount of time spent downloading giant images.
The first step would be gathering some metrics around how often images are downscaled ridiculous amounts.
I don't have a strong sense of how big an issue this is in practice. Any thoughts?
The text was updated successfully, but these errors were encountered: