I am trying to add a image avatar.png in config.toml.
I have set
avatarurl = "avatar.png" and avatar.png is in root directory. When I load the page, I see alt text avatar but not the image.
when I do inspect element. I see
<img src="http://localhost:1313/avatar.png" alt="avatar">
Am I missing something?
Hi, you just need to put the image in the "static" folder of your hugo repository.
You could also put it in the static/images folder for better consistency. But set the avatarurl property to '/images/avatar.png' instead.
Same issue and came here. Problem solved. I'd appreciate it if the wiki could change and address this.
Most helpful comment
Hi, you just need to put the image in the "static" folder of your hugo repository.
You could also put it in the static/images folder for better consistency. But set the avatarurl property to '/images/avatar.png' instead.