Images are not being rendered following update

Hi, I have just updated Hugo from a very old version to the latest and now none of my images are being rendered.

I have in my markdown:

![Demo](/Peek 2019-11-03 19-15.gif)

And what is showing up on my page is:

![Demo](/Peek 2019-11-03 19-15.gif)

ie… the text I have entered. No html <image src=..> is being rendered.

Any ideas what could have changed in the update? The problem occurs locally on my machine as well as on Netlify. I have searched far and wide and can’t seem to find anyone else who has this problem.

The troublesome page.
And the rendered output.

This could be caused by several things; difficult to say without seeing your project.

See https://discourse.gohugo.io/t/requesting-help/9132.

Let us see your code

Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.

If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.

Good call. I’ve updated the question. I was only allowed two links in the post, but if needed the whole repo is here.

I should have seen this in your initial post. Per the CommonMark specification, link and image destinations with spaces must be wrapped in <>.

![Demo](</Peek 2019-11-03 19-15.gif>)

We switched to a CommonMark compliant markdown renderer a few years ago, but maybe the version you were using preceded that.

2 Likes

Ah! Yes that’s fixed it. Thanks. I probably saw hundreds of links like that in the docs and completely blanked out the <>.

1 Like

I think it doesn’t hurt to point out that the < and > wrapping is only required due to the spaces in the link. I think that also means they can be omitted if the spaces are url-encoded with %20.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.