Markdown insert base64 image error: file name too long

The blowfish theme uses a custom image render hook to convert Markdown image elements to HTML.

Although not related to your problem, this render hook generates invalid HTML because it wraps the figure element within a paragraph element. The theme author needs to fix that.

Your problem…

Unless the image destination begins with https, the image render hook interprets the image destination as a file path, and attempts to find a page resource or a global resource with that path. The length of your data URI exceeds the operating’s system path length limit… hence the error.

To make data URI’s work with the blowfish theme, the theme author would need to make some changes to the render hook.


Also note that Hugo’s embedded image render hook does not handle data URIs either, but I’m not sure that’s something we want to change given the rarity of this use case.

2 Likes