Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image size reported as good, but it's not #29

Open
nhoizey opened this issue May 10, 2017 · 7 comments
Open

Image size reported as good, but it's not #29

nhoizey opened this issue May 10, 2017 · 7 comments

Comments

@nhoizey
Copy link

nhoizey commented May 10, 2017

For example on this page: https://nicolas-hoizey.com/2017/01/how-much-data-should-my-service-worker-put-upfront-in-the-offline-cache.html

When using a viewport width of 614px, it says the screenshot from WebPagetest is at the right dimensions (natural 551x394), but when I use the console to get the currentSrc, it shows that the image is 980 pixels wide:

image

@andydavies
Copy link

@nhoizey Presume you're on a retina mac of some sort?

The natural width property allows for pixel density

@nhoizey
Copy link
Author

nhoizey commented May 11, 2017

@andydavies on a Retina MacBook indeed, but the window was on a non Retina external screen.

@simonhearne
Copy link
Contributor

image
Confirmed that the correct image is being sent and detected on a retina display.
naturalWidth accounts for DPI, as does cloudinary.
Can you check the natural size as given in devtools?

@simonhearne
Copy link
Contributor

Actually client hints isn't in play so Cloudinary isn't doing anything clever with DPI, just srcset.

@jamiecoombs
Copy link
Collaborator

In any case, we probably need to add a glossary somewhere in the extension so it's clear what the numbers mean.

@tabanliviu
Copy link
Contributor

tabanliviu commented Aug 9, 2017

@nhoizey can you look if this is still an issue with the 1.5.0 release? thanks

@nhoizey
Copy link
Author

nhoizey commented Feb 9, 2018

@tabanliviu sorry for the late answer, the result is almost the same.

image

currentSrc tells me the image loaded from Cloudinary is 670 pixels wide (I've changed my settings, that's why the size is different).

So why is Image coverage: 1.0x? Shouldn't it be 1.213x (670 / 552)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants