5

Working on this repo for an NPM module

the image shows up on Github (scroll down)

https://github.com/ORESoftware/suman

enter image description here

but on NPM, despite an HTTP 200 to retrieve the image from Github, it doesn't show up

https://www.npmjs.com/package/suman

this is all Markdown, and the markdown for the image is:

![alt text](https://github.com/ORESoftware/suman/blob/master/images/suman.png "Suman Primary Logo")

Anyone know why this markdown image tag doesn't work on NPM?

enter image description here

Alexander Mills
  • 90,741
  • 139
  • 482
  • 817

2 Answers2

4

use this url (https://raw.githubusercontent.com/ORESoftware/suman/master/images/suman.png)

Your url link to a page not a image

Jian
  • 3,118
  • 2
  • 22
  • 36
1

This is because the url

https://github.com/mvsowndapan/react-dnd-crop/blob/master/asset/icons/labelIcon.png

requesting to the github page that contains the image, not the image itself.

To get the image just add ?raw=true at the end of the url

https://github.com/mvsowndapan/react-dnd-crop/blob/master/asset/icons/labelIcon.png?raw=true

like this. It works fine