DEV Community

Marco Suárez
Marco Suárez

Posted on

How do I put a header image in a post?

Top comments (3)

Collapse
 
maestromac profile image
Mac Siri • Edited

By adding cover_image into the front matter. Click on "Help" to the left of "Markdown" on top when you are writing a post for more info.

Collapse
 
chrisvasqm profile image
Christian Vasquez

In case @maestromac's answer is not clear enough, the top of your post would look like this at the beginning:

---
title: ""
published: false
description: ""
tags: 
---
Enter fullscreen mode Exit fullscreen mode

And to add the cover_image, you will have to do it manually:

---
title: 
published: false
description: 
tags: 
cover_image: <IMAGE-URL>
---
Enter fullscreen mode Exit fullscreen mode

And that image URL should be ending on a image file extension like .jpg or .png.

Collapse
 
nickraphael profile image
Nick Raphael

How do I get my editor to look like that?