Weird image path problem

I have a website with an absolute path of the sort:

and this is also my baseURL set in my Hugo configuration file.

I am trying to put an image in a post using the path /img/image.png and the image file is in /static/img. However, my image is not displayed at all. As a matter of fact, if I open the image link in another window, its url is missing /~username/ part of the path.

Any ideas what am I doing wrong?

I think I figured this one out.

In order for links to images to work, I need to insert images using path /username/img/image.jpg

I somehow thought that should be taken care of by setting the baseURL, but obviously not.