YouTube videos in Markdown – via Markdown Cheatsheet · adam-p
Posted by jpluimers on 2018/02/28
Clever, as I didn’t know you could directly refer to the YouTube preview image using the “/0.jpg” trick:
Youtube videos
They can’t be added directly but you can add an image with a link to the video like this:
<a href="http://www.youtube.com/watch?feature=player_embedded&v=YOUTUBE_VIDEO_ID_HERE " target="_blank"><img src="http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg" alt="IMAGE ALT TEXT HERE" width="240" height="180" border="10" /></a>Or, in pure Markdown, but losing the image sizing and border:
[](http://www.youtube.com/watch?v=YOUTUBE_VIDEO_ID_HERE)
Source: [WayBack] Markdown Cheatsheet · adam-p/markdown-here Wiki · GitHub
Gif using gifs.com
If you allow using resources outside of YouTube, then you can use gifs.com to render the video into a gif image and use that image in the above construct.
I tried that with a few seconds from http://www.youtube.com/watch?v=iHOpw55TI-U which resulted in https://gifs.com/gif/liquid-prompt-Lg1kPp and the gif file https://j.gifs.com/Lg1kPp.gif
via: [WayBack] flash – How to embed a video into GitHub README.md? – Stack Overflow (thanks [WayBack] aloisdg for answering)
–jeroen
Becomes
and
Becomes https://gifs.com/gif/linux-liquid-prompt-BgXJRW
Rate this:
Share this:
- Click to share on Mastodon (Opens in new window) Mastodon
- Click to share on Bluesky (Opens in new window) Bluesky
- Share on Tumblr
- Click to share on Reddit (Opens in new window) Reddit
- Click to share on Threads (Opens in new window) Threads
- Tweet
- Click to share on Telegram (Opens in new window) Telegram
- Click to share on Nextdoor (Opens in new window) Nextdoor
- Click to share on WhatsApp (Opens in new window) WhatsApp
- Click to print (Opens in new window) Print
- Click to email a link to a friend (Opens in new window) Email
Related
This entry was posted on 2018/02/28 at 12:00 and is filed under Development, Lightweight markup language, MarkDown, Power User, SocialMedia, Software Development, YouTube. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
This site uses Akismet to reduce spam. Learn how your comment data is processed.








Leave a comment