Recently while implementing Dark Mode into a Gatsby / Sanity project I realized the images need alternate images as well. Here's how I quickly set it up using Sanity CMS.
Gatsby-Image is awesome. It does a ton of optimization for you. Sometimes it needs to be turned off. Here's how I do it.
A quick explanation of the differenced regarding Google PageSpeed and Google Lighthouse website optimization scoring.