The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,376 other followers

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:

[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg)](http://www.youtube.com/watch?v=YOUTUBE_VIDEO_ID_HERE)

Source: [WayBackMarkdown 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: [WayBackflash – How to embed a video into GitHub README.md? – Stack Overflow (thanks [WayBackaloisdg for answering)

–jeroen

Becomes

and

 

Becomes https://gifs.com/gif/linux-liquid-prompt-BgXJRW

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: