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

Optimization: Image elements do not have explicit width and height #4177

Closed
rfultz opened this issue Nov 5, 2020 · 0 comments · Fixed by #4534
Closed

Optimization: Image elements do not have explicit width and height #4177

rfultz opened this issue Nov 5, 2020 · 0 comments · Fixed by #4534

Comments

@rfultz
Copy link
Contributor

rfultz commented Nov 5, 2020

Background

Looking to optimize the site's performance and that of the homepage specifically, the Lighthouse tool in Chromium browsers has made some suggestions. Some of these will have repercussions throughout the app so we're going to make them their own tickets.

Recommendation: Image elements do not have explicit width and height

Set an explicit width and height on image elements to reduce layout shifts and improve CLS. details

Overview

We could set default image sizes for all images so browsers could render the page before waiting for images to fully load.

Benefit (the 80 of 80/20)

Medium? Lighthouse lists it medium-high

Effort (the 20 of 80/20)

Probably light

Complications

  • Would these default sizes apply for all browser widths? Any complications across devices sizes?

Completion criteria

  • Lighthouse is no longer throwing this warning
  • Any images that get a new height/width parameter don't break smaller or wider layouts

Related tickets

This was referenced Nov 5, 2020
@rfultz rfultz added this to the Sprint 14.3 milestone Mar 17, 2021
@rfultz rfultz self-assigned this Apr 1, 2021
@rfultz rfultz modified the milestones: Sprint 14.3, Sprint 14.4 Apr 2, 2021
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.

1 participant