Background image--how to?

Dear Hugoists:

Here is a scan of my config.toml:

I have placed a large background image in my static folder, which contains an img folder; I link to it here in the config.toml so I can change my site’s background to this image.

“But nothing ever happens, and I wonder”

Cheers for any help!


Where do you reference the background image?

There’s far too less information in your post. But I guess that you should get read of the /static/ part in your URL. Also, the developer console of your favorite browser will tell you which images your document tries to load.

Thanks! I think the information was sufficient:

I mentioned

  1. Where the image was
  2. How I had linked to it in the config.toml.

What else should I provide?

Thanks for your reply!

In the config.toml as you see in the screenshot. I have removed the /static and still it does not load.

A link to your repo would help or at least show us the code from your template/css etc. where you insert the image.

1 Like

Well yes, you mentioned that. But last time I looked, backgroundImage was not part of HUGO’s config parameters. So it is probably something your theme uses.
But you didn’t even mention that you’re using a theme, far less which one.
Or maybe you use it in a template, but you didn’t say so either. How can anybody but you know what you’re doing to display the background image? As @frjo said:

Otherwise, only a clairvoyant can help you, and those are quite rare nowadays.

When using the Hello Friend NG theme:


└── img/
    └── foo.jpg


backgroundImage = 'img/foo.jpg'

Please contact the theme author if you have additional questions.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.