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 aspect ratio audit is too strict #5356

Closed
nrsbus opened this issue May 25, 2018 · 2 comments · Fixed by #5358
Closed

Image aspect ratio audit is too strict #5356

nrsbus opened this issue May 25, 2018 · 2 comments · Fixed by #5358

Comments

@nrsbus
Copy link

nrsbus commented May 25, 2018

Running Lighthouse as a plugin in the latest version of Firefox (Lighthouse 3.0.0-beta.0).

How can I correct this?? I have tried everything I can think of - and I don't understand why the image is not being displayed correctly.

Thanks,
Todd

RESULTS FROM LIGHTHOUSE SCAN (nrsmart.com):
Displays images with incorrect aspect ratio
Image display dimensions should match natural aspect ratio.
URL
Aspect Ratio (Displayed)
Aspect Ratio (Actual)

/assets/nrsmart-logo-longtext.png(https://nrsmart.com)
412 x 36 (11.44)
800 x 69 (11.59)

@patrickhulce patrickhulce changed the title Image displays with incorrect aspec ratio? Image aspect ratio audit is too strict May 25, 2018
@patrickhulce
Copy link
Collaborator

patrickhulce commented May 25, 2018

The issue here is that there is no precise way to scale down the image without distorting the aspect ratio. Example if the image were 800x70 you'd be able to scale it to 400x35. Consider shipping the image in the size you plan on using it.

Either way, our audit could be a little more lenient in these cases. If the image is +/- 2px it should ignore it.

@nrsbus
Copy link
Author

nrsbus commented May 25, 2018

Yeah, I really don't want to change the image size or it won't scale properly to mobile phones... Whatever quality loss there may be, it's minimal. It does not noticeably hurt the user experience as it currently stands...

With all that being said - I agree that maybe the audit is a bit too strict...

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

Successfully merging a pull request may close this issue.

2 participants