Difficulty in uploading images on GitHub

33 Views Asked by At

I'm finding it difficult to upload an image to my GitHub readme page and repository. I have tried the formats I saw on YouTube, but none of them worked.

I tried using []Alt and () image link. Also I tried uploading the image by dragging the screenshot in to the GitHub readme page or repository.

Lastly, I tried uploading the image on the issue page and copy the image address to the intended location but it didn't work. It kept on showing cracked image

I'm trying to find a way to upload the images without showing cracked image.

1

There are 1 best solutions below

9
hegerdes On

In general GitHubs README.md uses markdown. To include images you can use these syntaxes:

Here's our logo (hover to see the title text):

Inline-style: 
![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 1")

Reference-style: 
![alt text][logo]

[logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 2"

The link in the () can be relative, like in the ./docs/my-img.png or absolut via a URL like https://i.imgur.com/Ozgwrq2.jpeg

See here for a complete markdown cheatsheet