Avatar not showing

Hello, I’ve made a github website with Hugo cactus theme. The problem is the main avatar doesnt show. I replaced the avatar.png with a new image on the static/images folder but the image doesn’t display correctly (it shows a missing image icon and only show for a second when I click the avatar). What am I missing?

You mean, it didn’t show when you serve the site in hugo server? I ask because if you put the site up on a web host, broken images can sometimes mean a permissions problem.

I would suspect the path, though. If you look at the source, where does the site expect the avatar will be? And where did you actually put it, physically?

Thanks for the reply,

I changed it to avatar@2x.png since that’s what i see in source code. It worked for the localhost but not for the deployment. Any thoughts why’s that happening?

I fixed it thanks for the direction!

May I ask how did you solve it? My avatar is also not showing. If I choose gavatar in config.toml, then there is an avatar after deployment. But if I choose my own portrait.jpg under static/img/, then nothing is there after deployment.

Has this been solved? I am having the same issue. The file seems Ok, and it is located in static/img/ as the documentation dictates but it is still not being rendered on the page.

If you are having an issue with images showing up in your Hugo theme please do the following:

  1. Read Requesting Help, you’ll find what we need to know to assist you. :slight_smile:
  2. Create a new thread in #support.
  3. Make sure to include all the information needed to troubleshoot: theme, your site’s code, a detailed account of your issue, and any error messages.
  4. When your issue is solved, please mark it as solved so others can benefit from our collaboration in the future.

For theme issues, it is often best to ask the theme author first. Check if the theme has an issue tracker or support forums linked in the README that comes with the theme.