As of version 9.1, Drupal automatically lazy-loads images by default. This functionality adds a
loading="lazy" attribute when outputting an
<img> tag. When the browser sees this, it will not download the image until it enters the viewport. This can save your user (and your web host) gobs on bandwidth by not downloading images that will never be used.
Gatsby is a ReactJS based static site generator. This means that the build process will automatically generate all files that are sent to the end-user's computer. You don't need to do server-side processing.