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


$ hugo env
hugo v0.123.4-21a41003c4633b142ac565c52da22924dc30637a+extended windows/amd64 BuildDate=2024-02-26T16:33:05Z VendorInfo=gohugoio

How to reproduce:

Command prompt 1:

git clone --single-branch --branch temp2
hugo server

Open this page in your browser for preview:


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…

… look at " Options inherited from parent commands"