Learn GatsbyJS by creating a tourism site -6

Photo by Ryan Pearson on Unsplash

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

As told in the earlier post, this series is based on the learning from this awesome udemy course by John Smilga

As told in the earlier post, we need to install some plugins for using one of the main feature of Gatsby, which is image optimization in sites.

We need to install gatsby-source-filesystem first. This plugin is for using data into your Gatsby application, from local filesystem. In our case it will be images. The docs for the same can be found here.

As per the docs we need to npm install the plugin in our project directory.

So, head over to project directory and stop any gatsby develop, if it is running.

npm install

Rest of the chapter is exclusive content and will be in my upcoming book Gatsby Cookbook.

When you see the output on your browser, you can see the About component displaying the same image. But what you see is an optimized image, which loads very fast on all screen with even slow internet speeds.

New Image

This completes part-6 of the series. You can find the code for the same in this link.

You can find part-7 here.

--

--

--

Founder TWD, JavaScript & ReactJS Trainer, Youtuber, Blogger

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Components & Containers— MERN Blog Application — Part 4

Working with variables and conditionals in Go Lang

Creating The Boss Fight! (Part 2: The Shield Generator’s Setup & Movement)

The Adapter Pattern in JavaScript

Striped pattern

Diverse Arrays Operation In JavaScript

React Hooks tutorials for beginners-9

This.JavaScript: State of Frameworks- Vue Update

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nabendu Biswas

Nabendu Biswas

Founder TWD, JavaScript & ReactJS Trainer, Youtuber, Blogger

More from Medium

Collaborative Drawing App: Canvas & Palette Setup

VideoMessenger App

Deploying React app to GitHub Pages

Containerize React.js Application With Node.js