Hugo-coder: avatar not loading issue

Created on 5 Mar 2020  路  2Comments  路  Source: luizdepra/hugo-coder

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?

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.

All 2 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rchaganti picture rchaganti  路  4Comments

davhin picture davhin  路  5Comments

M-Brody picture M-Brody  路  6Comments

luizdepra picture luizdepra  路  7Comments

paskal picture paskal  路  6Comments