In order to tell you what you're doing wrong, we need to see what you're doing in the first place. Would you care to share a link to a Gist that you're trying to get this to work with?
Thanks for sharing that link. The URL that you're trying to link the image to is only
2018-05-07 (3).png . Where is this image located? To add images to a Gist using Markdown, the image has to be uploaded somewhere accessible.
Wonderful! I'm glad you were able to find a solution!
Just as a quicker, potentially easier alternative (work-around), you can also upload your image to a comment on your Gist itself. Then, you can copy the image link that is generated from that, and use that in the Markdown link.
Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!
Here's an old Gist of mine mentioning the above method (adding images to Gist using comments):
However, the above method of adding image to comment section doesnt work now.
Update: Github Engineering seems to be working on fixing it.