I’m a bit confused about what should trigger a re-render of a page that references a resource, e.g. when using the builtin {{< figure >}}shortcode to create an HTML<figure /> from either a global asset or a page resource.
I’m pretty sure that changing a resource once triggered a re-render of the page referencing it, but this is no longer the case. I can see that the change is detected by the hugo server process – it does “something” – but the page is not re-rendered. I have to restart huger server (or modify the page referencing the resource) for the change to show up in the browser, i.e. for the page to be actually re-rendered.
It does not matter whether I use --disableFastRender, --renderToMemory, --noHTTPCache, refresh the browser page, …
Is this the normal / desired behavior of hugo server? I’m running 169.0 on Archlinux.
mmh, I just picked that up for a test and cannot reproduce
setup:
hugo v0.169.0-1da10fc44701c566b1669cdb2d12638f155138bd windows/amd64
the image directly in the project/assets/img folder
no os-links, modules/mounts/imports, all on same filesystem, no containers,snaps, …
latest Chrome with DevConsole ->TAB Network ->DisableCache TRUE
added {{< figure src="img/changed.png">}} to a content file
fired up hugo server
browsed to the page
copied a different file over it cp error.png changed.png
the webpage was instantly updated (without refresh or restart)
Log
remove-item -recurse -force public; remove-item -recurse -force resources;hugo server --logLevel debug
Watching for changes in C:/REPO/assets/{css,fonts,img,js}, C:/REPO/layouts/_partials, C:/REPO/package.json, C:/REPO/static, C:/REPO/assets/{img,user}, C:/REPO/content/posts, C:/REPO/package.json, C:/REPO/static/downloads
Watching for config changes in C:\REPO\REPO\hugo.toml, C:\REPO\REPO\hugo.toml, C:\REPO\REPO\go.mod, C:\REPO\REPO\hugo.work
Start building sites …
hugo v0.169.0-1da10fc44701c566b1669cdb2d12638f155138bd windows/amd64 BuildDate=2026-10-27T14:52:20Z VendorInfo=gohugoio
INFO build: step process substep collect files 25 files_total 25 pagesources_total 11 resourcesources_total 14 duration 0s
INFO build: step process duration 0s
INFO static: syncing static files to \ duration 33.4503ms
INFO build: step assemble duration 152.429ms
INFO build: step render substep pages site en outputFormat html duration 386.9781ms
INFO build: step render pages 8 content 7 duration 386.9781ms
INFO build: step render deferred count 0 duration 0s
INFO build: step postProcess duration 0s
INFO build: duration 539.4071ms
│ EN
──────────────────┼────
Pages │ 8
Paginator pages │ 0
Non-page files │ 14
Static files │ 5
Processed images │ 19
Aliases │ 0
Cleaned │ 0
Built in 541 ms
Environment: "development"
Serving pages from disk
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop
INFO build: step render substep pages site en outputFormat html duration 0s
INFO build: step render pages 0 content 0 duration 0s
INFO build: step render deferred count 0 duration 0s
INFO build: step postProcess duration 0s
INFO build: duration 1.721ms
DEBUG Received System Events: [WRITE "C:\\_REPO\\assets\\img\\changed.png" WRITE "C:\\_REPO\\assets\\img\\changed.png" WRITE "C:\\_REPO\\assets\\img\\changed.png"]
Change detected, rebuilding site (#1).
2026-11-11 18:39:07.529 +0100
DEBUG cachebuster: Matching "assets/img/changed.png" with source "(postcss|tailwind)\\.config\\.(js|mjs|cjs)": no match
Asset changed /img/changed.png
DEBUG Direct dependencies of "/img/changed.png" (*paths.Path) =>
INFO build: step process substep gc dynacache duration 547.1µs
INFO build: step process substep resolve page output change set changes 2 checked 29 matches 1 duration 519.3µs
INFO build: step process duration 2.1487ms
INFO build: step assemble duration 0s
INFO build: step render substep pages site en outputFormat html duration 4.1422ms
INFO build: step render pages 1 content 1 duration 5.1895ms
INFO build: step render deferred count 0 duration 0s
INFO build: step postProcess duration 0s
INFO build: duration 7.8577ms
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Total in 7 ms
INFO livereload: build changed 1 files: ["\\img\\changed.png"]
INFO livereload: refreshing "/img/changed.png"
And if changed.png is in a sub-folder of img or rather src is a full path to a page resource instead of a global asset?
I’m on version 0.170.0 now, but the behavior is unchanged.
My content pages are all “branch bundles” (folders with an _index.md and possibly further _index.LANG.md files) with a “headless leaf bundle” (sub-folder with an “index.md”) which contains the resources used for figures. Those resources might even get pre-processed using my custom figure shortcode, if they are not an image file, i. e. a d2 diagram source get’s rendered to SVG using kroki. But the automatic page refresh also fails for plain SVG resources, maybe because my custom figure shortcode actually finds (headless) page resources (even with relative paths) and uses them (see below).
Having the figure resources all stored as global assets isn’t an option for me, because multiple authors work in a rather large content tree (split into multiple git repositories). I’m very much relying on the following to actually work properly, but I seriously doubt that hugo knows which page resources were actually used to render a page and hence fails to re-render the page when these resources change.
Use build options in front matter to create a leaf or branch bundle that Hugo does not render or list, but whose content and page resources you can use in other pages. For example, a headless leaf bundle can hold content and images that you render on the home page with the Site.GetPage method.
I just noticed that the builtin figure shortcode has a (silent) fallback ($u.String) for when .Page.Resources.Get and resources.Get both fail in the not $u.IsAbs case. I wonder how often page resource lookups actually work in practice, since this fallback might just save the day, when the resource is published with the page.
but you play with “_index” for pages and multilang and headless sections inside your “page”… + at least a custom shortcode …
to much for me to follow without a runnable reproducable example.
Means looking into that in depth would need a shared repo
and exact use case how to reproduce.
maybe it’s in how and where the .RelPermalink of the resource from your headless sub-page is called. and how that integrates with your calling page. maybe it’s bound to the headless page not the displayed.
Any specific reason for the headless image container page?
update:
no idea how transient your render chain is. guess it breaks with the getPage in the Shortcode