Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change Hugo's post image

Tags:

hugo

I want to change hugo's post image.

+++
title = "how to read the book"
draft = false
date = "2017-01-25T21:39:26-06:00"
image = "book.jpg"
+++

Hello World. New Book Review.

I put book.jpg under mywebsite/static/images/ directory. But the post still using the default image.

Any suggestions?

like image 659
Tester Avatar asked Oct 18 '22 18:10

Tester


1 Answers

I solved this issue by changing image = "book.jpg" to thumbnail = "images/book.jpg"

I followed the official guide from https://gohugo.io/overview/quickstart/ originally. It is very confusing.

like image 156
Tester Avatar answered Oct 21 '22 07:10

Tester