Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Image won't show up on NPM, but shows up on Github

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

like image 611
Alexander Mills Avatar asked Apr 10 '16 23:04

Alexander Mills


2 Answers

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

Your url link to a page not a image

like image 194
theJian Avatar answered Sep 21 '22 19:09

theJian


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

like image 41
sowndapan vijayakumar Avatar answered Sep 24 '22 19:09

sowndapan vijayakumar