Recipe site in Gatsby and Firebase-7

Nabendu Biswas
2 min readMay 23, 2020

--

Welcome to part-7 of the series. You can find part-6 here.

We will convert our code to use the optimised gatsby-image now. In any site the image loading takes most of the time and it slows down the site. For our site also this is the case and we will fix it by using gatsby-image.

We will be using the gatsby-plugin-remote-images for this. The documentation for the same can be found here.

First we need to install it by the below npm command. So, stop gatsby develop and run the below command in terminal.

npm install --save gatsby-plugin-remote-images

Now, we need to add the plugin in our gatsby-config.js file.

gatsby-config.js

Rest of the chapter is exclusive content and will be in my upcoming book Gatsby Cookbook. You can find more details about it here.

Gatsby Cookbook

Now, we will receive the big original image, which will change according to screen size.

Fluid image

This completes part-7 of the series. You can find part-8 here.

You can find the code for the same in this github repo.

--

--

Nabendu Biswas
Nabendu Biswas

Written by Nabendu Biswas

Architect, ReactJS & Ecosystem Expert, Youtuber, Blogger

No responses yet