sciencehistory / scihist_digicoll

Science History Institute Digital Collections
Other
11 stars 0 forks source link

Resize "hero" images on main page #2647

Open jrochkind opened 3 months ago

jrochkind commented 3 months ago

We are using very large JPGs, without srcset, for the large rotating "hero" image.

The actual images look even larger than 2x the actual screen size taken on a fairly large screen.

This is a lot more bytes than is needed, slowing down page loading (especially on slower networks) -- and probably slowing down Google's metrics on our page responsiveness, leading ot less Google SEO than we could have.

We should make a series of resizes for each one, and use srcset to let the browser pick the appropriate one for actual size displayed (and network speed if browsers do that, but sadly I don't think they do)

jrochkind commented 1 month ago

Also convert to .webp and maybe run through other optimizer tools to make smaller. As largest image on the page, it will help our Google SEO to make these images load faster.

(Could consider doing that with our single-work large thumbs in the future!)