Closed masakudamatsu closed 4 years ago
The sizes
attribute:
(min-width: 728px) 605px, (min-width: 557px) 518px, 100vw
.For small screens, 100vw
is good enough and future-proof in case we change the CSS code. See https://ericportis.com/posts/2014/separated/
We have to include 4x images: see the list of pixel densities in the market https://www.mydevice.io/#tab1
We use RespImageLint to check the HTML code for responsive images.
Vercel doesn't support Git LFS, which causes images to be not rendered in the webapp.
We remove the tracking of image files with Git LFS.
Google's PageSpeed Insights shows that we can reduce the loading time by 1.95s with the reduction in image sizes.
Previously, the
srcset
attribute didn't work. But it turns out that React doesn't interpretsrcset
butsrcSet
.