Adding images to blog wrong url

Hey everyone,
I am trying to add an image to my blog. However, it goes to the wrong URL for some reason.

The code I am using -
Example image

When I view the source of the page, this is where its actually going-
http://localhost:1313/site/post/my-post-title/static/my-image.png

Anyone has any clues?

You are looking for the difference between an absolute and relative URL. When you grok that, you’ll be able to figure out how to create that URL. :slight_smile:

1 Like

Agreed with @maiki, but I also need an actual code block (a source repo is even better) to get an idea of how to provide you with support :smile:

I would normally not answer this question, as it isn’t Hugo-specific, but I happen to read the forums in mutt, so I was able to see the code block @nishant included, as it rendered as markdown in the text email. :slight_smile:

@nishant, when you include code samples online, please wrap them in a <code> block. Most sites support something like ``` as a code fence, you can search around on how to do that correctly.