Hugo v0.123.4: change detected, but changed images are not refreshed

Environment:

$ hugo env
hugo v0.123.4-21a41003c4633b142ac565c52da22924dc30637a+extended windows/amd64 BuildDate=2024-02-26T16:33:05Z VendorInfo=gohugoio
GOOS="windows"
GOARCH="amd64"
GOVERSION="go1.22.0"
github.com/sass/libsass="3.6.5"
github.com/webmproject/libwebp="v1.3.2"

How to reproduce:

Command prompt 1:

git clone --single-branch --branch temp2  https://github.com/deining/vitalcontrol.de.git
cd vitalcontrol.de
hugo server

Open this page in your browser for preview:

http://localhost:1313/docs/listen/frischmelker/

Now open another command prompt and issue there:

git checkout temp1

Hugo detects the change and a browser refresh happens:

Change detected, rebuilding site (#7).
2024-02-28 12:45:37.637 +0100
Source changed /docs/listen/bilder/alarmstatusaendern2.png
Source changed /docs/listen/bilder/statusumkehren.png
Source changed /docs/listen/bilder
Total in 161 ms

Change detected, rebuilding site (#8).
2024-02-28 12:45:38.111 +0100
Source changed /docs/listen/bilder
Total in 87 ms

The two changed .png images are not refreshed inside the page, however.

With hugo v0.122.0, everything works as expected.

1 Like

From the next version, 0.123.0, Hugo server started rendering from disk instead of memory. I found various things that wouldn’t refresh with this new default behaviour.

However you can avoid this by adding the new --renderToMemory flag when running the server.

hugo server --renderToMemory

This is currently listed under the hugo command in the docs so easy to miss. I assume it should be under hugo server.

It’s under both. On this page…

https://gohugo.io/commands/hugo_server/

… look at " Options inherited from parent commands"