Because the post Gatsby descrete notes is too long, I write a separate post just for images in Gatsby.

Rule of thumb

Type of images to be processed

Read this post from CSS-Tricks to know which images should be processed, which ones should not.

Single photo

Install stuffs following this doc,

npm install --save gatsby-image gatsby-plugin-sharp gatsby-transformer-sharp