Images not appearing w/ localhost and latest Hugo (0.54.0)

I’ve used Hugo in the past without issue, but recently when I installed Hugo using brew I found that I images in themes no longer display, or even get generated when viewing the raw HTML, when running locally with:

hugo server -D or hugo server

For instance, the quick start tutorial ananke theme displays everything except the gargoyle/cityscape image. CSS, Javascript, and posts generate and load fine. This is occurring on MacOS 10.13.6 and the latest version of Windows 10. Also, this behavior occurs in all browsers I’ve tested in on both OS’s (Chrome, Firefox, Safari). Any ideas as to what may be causing this?

Hi,

Do you have your code demonstrating this issue somewhere we can take a look at? Looking at the demo page for the ananke theme for example, I can see that the gargoyle image does get generated. The theme demo pages are generated with Hugo.

That specific theme’s documentation describes how to change the hero image background. Perhaps you are not setting the URL there correctly?

Hi Pointyfar,

I can post the code to a GitHub repo, but before doing that let me point out, I’m having this issue when following the hugo quickstart tutorial at - https://gohugo.io/getting-started/quick-start/. The exception being that I git clone the theme to my local machine as opposed to git submodule add as described in the quick-start

I’m not sure if that tutorial is current though? Let me know one way or another, or if I should be using themes in a manner different form what is described in the quick start. If need be, then I’ll create and link a git repo to the codebase for others to examine. Thanks.

Step 6 of the quickstart suggests to head to the specific theme’s site for theme-specific configuration options. The hero image (the gargoyle) is one such example of a theme-specific configuration.

Did you specify the hero image background url correctly in your config.toml?

2 Likes

Hi Pointyfair,

Thanks that was it, I needed to overwrite the autogenerated config.toml file with the contents from the Ananaki themes ‘example-site>config.toml’.

Based on your last response I re-read the themes page on Hugo’s site and the Github page for this particular theme. Completely user error on my part, and your time and help was much appreciated!

1 Like