optimize homepage splash: resize, crush, srcset

original: 84kb
new 2x: 56k
new 1x: 19k
This commit is contained in:
Matt Dunn-Rankin 2020-05-23 13:59:56 -07:00
parent 29b9fe48c5
commit 661eea0275
3 changed files with 2 additions and 0 deletions

View file

@ -8,6 +8,7 @@ import { useLazyQuery } from "@apollo/react-hooks";
import { Heading1, usePageTitle } from "./util";
import HomepageSplashImg from "../images/homepage-splash.png";
import HomepageSplashImg2x from "../images/homepage-splash@2x.png";
import SpeciesColorPicker from "./SpeciesColorPicker";
function HomePage() {
@ -25,6 +26,7 @@ function HomePage() {
<Box
as="img"
src={HomepageSplashImg}
srcSet={`${HomepageSplashImg} 1x, ${HomepageSplashImg2x} 2x`}
alt=""
width="200px"
height="200px"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB