tutorials1 Min Read

How to get Youtube Video Thumbnail Images

Gorav Singal

March 04, 2018

TL;DR

YouTube exposes public thumbnail URLs at img.youtube.com/vi/{VIDEO_ID}/ in various resolutions (default, medium, high, standard, maxres) that anyone can use.

How to get Youtube Video Thumbnail Images

Problem

You know your youtube URL. And, you want to know its thumbnail image that you can use on your website, or somewhere. Note: Video can be any video on youtube.com website.

Get Youtube Thumbnail Images

Youtube provides video's thumbnails publically available to users. Anyone can use them. Youtube provides multiple resolution images. You need to know the video id.

If your youtube video looks like:https://www.youtube.com/watch?v=g0kFl7sBdDQ

Then, your video id is:g0kFl7sBdDQ

There are two ways to get thumbnail URL:

  1. Get URL from any of following possible URLs:
    1. https://i.ytimg.com/vi/<video_id>/default.jpg
      Having dimensions: 120x90
      This is the default image.
    2. https://i.ytimg.com/vi/<video_id>/mqdefault.jpg
      Having dimensions: 320x180
      This is called medium size thumbnail.
    3. https://i.ytimg.com/vi/<video_id>/hqdefault.jpg
      Having dimensions: 480x360
      This is called high size thumbnail.
    4. https://i.ytimg.com/vi/<video_id>/sddefault.jpg
      Having dimensions: 640x480
      This is called standard size.
    5. https://i.ytimg.com/vi/<video_id>/maxresdefault.jpg
      Having dimensions: 1280x720
      This is the maximum resolution available
  2. Use Youtube Rest APIs
    See: Using Youtube Rest APIs

Enjoy.

Share

Related Posts

Drupal Helpful codes for database queries

Drupal Helpful codes for database queries

Being a drupal user from last around 5 years, I used to know small codes for…

Curl - Your friend for Rest APIs/Calls - Basic Commands

Curl - Your friend for Rest APIs/Calls - Basic Commands

Curl is a wonderful tool for initiate REST APIs or calls. Or, you can literally…

Docker image for Drupal 7, and Php extension MongoDB installed.

Docker image for Drupal 7, and Php extension MongoDB installed.

You have drupal 7 image from docker hub, and want to connect tomongo db via php…

Docker Push&#58; How to push your docker image to your organization in hub.docker.com

Docker Push&#58; How to push your docker image to your organization in hub.docker.com

Tag the image, by seeing its image id, from docker images command docker tag 04d…

Youtube API in NodeJs, Usage with Example

Youtube API in NodeJs, Usage with Example

This library is ES6, promise compatible. Or, in your package.json file, include…

Jira Rest APIs common usages

Jira Rest APIs common usages

This article shows some of common usages of JIRA rest apis. Note: This article…

Latest Posts

AI Video Generation in 2025 — Models, Costs, and How to Build a Cost-Effective Pipeline

AI Video Generation in 2025 — Models, Costs, and How to Build a Cost-Effective Pipeline

AI video generation went from “cool demo” to “usable in production” in 2024-202…

AI Models in 2025 — Cost, Capabilities, and Which One to Use

AI Models in 2025 — Cost, Capabilities, and Which One to Use

Choosing the right AI model is one of the most impactful decisions you’ll make…

AI Image Generation in 2025 — Models, Costs, and How to Optimize Spend

AI Image Generation in 2025 — Models, Costs, and How to Optimize Spend

Generating one image with AI costs between $0.002 and $0.12. That might sound…

AI Coding Assistants in 2025 — Every Tool Compared, and Which One to Actually Use

AI Coding Assistants in 2025 — Every Tool Compared, and Which One to Actually Use

Two years ago, AI coding meant one thing: GitHub Copilot autocompleting your…

AI Agents Demystified — It's Just Automation With a Better Brain

AI Agents Demystified — It's Just Automation With a Better Brain

Let’s cut through the noise. If you read Twitter or LinkedIn, you’d think “AI…

Supply Chain Security — Protecting Your Software Pipeline

Supply Chain Security — Protecting Your Software Pipeline

In 2024, a single malicious contributor nearly compromised every Linux system on…