Skip to content

Commit

Permalink
Make category images on homepage lazy
Browse files Browse the repository at this point in the history
These are loading really early in the page, despite being at the bottom!
  • Loading branch information
cdrini committed Nov 11, 2021
1 parent 69a8938 commit e6fff80
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions openlibrary/templates/home/categories.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ <h2 class="home-h2"><a href="/subjects">$_('Browse by Subject')</a></h2>
<div class="category-icon">
<img class="category-img" src="/static/images/categories/$(icon).svg"
width="30" height="30"
loading="lazy"
alt="$_('browse %(subject)s books', subject=presentable_subject_name)"/>
</div>
<p class="category-title">$presentable_subject_name</p>
Expand Down

0 comments on commit e6fff80

Please sign in to comment.