

The steps below will help you find and download some photos for your hero images and add them to the frontmatter for each of your blog posts. These images are usually large, high-quality photos that are meant to grab the reader’s attention and make them want to stay on the page longer. Many blog sites include a hero image at the top of each post.

Since the image source you’ll load in the page template will change for each blog post, you’ll use the GatsbyImage component. mdx files to specify which image to use for each post. You’ll also add some frontmatter data to your blog post. In this part of the Tutorial, you’ll add a hero image to your blog post page template. If you ask someone to point you to the best coffee shop in town, where you end up will depend on whom you ask and what their personal preferences are. Using the GatsbyImage component is like asking for directions more generically.You’ll always end up in the same place, no matter how many people you ask. Using the StaticImage component is like asking for directions using a physical address, like “400 Main Street”.Here’s a quick analogy to help illustrate the difference:

