An absolute image path to the figure shortcode will not be processed but verbatim copied to the src attribute of the img tag. The error message is not from the builtin figure shortcode.
Maybe you are
using a theme that overwrites the standard implementation
there’s something with your site source.
the easiest to get help would be to share your repo.
Thanks @irkode, it looks like it was indeed an issue with my theme (hermit-v2). I see it overrides the figure shortcode, and the images render fine when I switch to ananke. I have to admit that as someone new to hugo, these sorts of complexities make it feel rather opaque and fragile.
The upside of that is that any site you can build with html, css and js you can build with Hugo.
The downside is a steeper learning curve and, if you are using a third party theme, the need to read the themes documentation as mush as Hugo documentation.
That Hugo allows me to build sites that way I (or clients) want are one of the selling points for me.
Different tools for different jobs. Hugo is not the right tool for every site or user.
When calling the figure shortcode, the hermit-v2 theme expects to find the image in the assets directory. You can either move your image file, or mount the static directory to the assets directory by including this in your site configuration:
The theme author should document this requirement, and they should also document the fact that you cannot use their figure shortcode with a page resource.