This post will help you if you want to get the preview image for a YouTube video. You may want to you this if you want to trigger the video to launch in a pop up window, or you want to link to the video.

I'm not sure how far back it goes, but it works for PSY's Gangnam Style which is from July 2012 and Justin Beiber's Baby which is from February 2010.

You need the id of the video which is in the url after v=

When you have the video id, you can use it in this url to get the image.
string youTubeId = "cIboJm2WzKY";
const string YOUTUBE_PREVIEW_IMAGE_URL = "{0}/maxresdefault.jpg";

<img src="@String.Format(YOUTUBE_PREVIEW_IMAGE_URL, youTubeId)" />

//The output will be

<img src="">

I trust this has been pretty straight forward for you to follow. If you have any questions, feel free to write them in the comments. Don't forget to share this post with your friends and colleagues.

Paul Seal

Umbraco MVP and .NET Web Developer from Derby (UK) who specialises in building Content Management System (CMS) websites using MVC with Umbraco as a framework. Paul is passionate about web development and programming as a whole. Apart from when he's with his wife and son, if he's not writing code, he's thinking about it or listening to a podcast about it.

Proudly sponsored by


  • Moriyama build, support and deploy Umbraco, Azure and ASP.NET websites and applications.

  • CI/CD service for Windows, Linux and macOS
  • Build, test, deploy your apps faster, on any platform.

  • Custom stickers for startups, artists and brands.
  • Bespoke easy-apply, removable, custom brand stickers printed in the UK.

  • is the easy error logging and uptime monitoring service for .NET.
  • Take back control of your errors with support for all .NET web and logging frameworks.
uSync Complete

  • uSync.Complete gives you all the uSync packages, allowing you to completely control how your Umbraco settings, content and media is stored, transferred and managed across all your Umbraco Installations.

  • More than a theme for Umbraco CMS, take full control of your content and design with a feature-rich, award-nominated & content editor focused website platform.

  • Affordable, Geo-Redundant, Umbraco hosting which gives back to the community by sponsoring an Umbraco Open Source Developer with each hosting package sold.