{"id":845,"date":"2015-06-04T10:30:54","date_gmt":"2015-06-04T04:30:54","guid":{"rendered":"http:\/\/promincproductions.com\/blog\/?p=845"},"modified":"2024-03-08T20:46:37","modified_gmt":"2024-03-09T02:46:37","slug":"youtube-image-thumbnail-urls","status":"publish","type":"post","link":"https:\/\/promincproductions.com\/blog\/youtube-image-thumbnail-urls\/","title":{"rendered":"YouTube Image Thumbnail URLs"},"content":{"rendered":"<p>I&#8217;ve always known there were a few different URLs to jpeg images of your YouTube videos, but I&#8217;ve just realized there are a few more URLS for YouTube thumbnail images than I previously thought and thus wanted to document the options. &nbsp;To the best of my knowledge YouTube doesn&#8217;t post these image URLs all for developers to use YouTube thumbnails.  So here is the list I have come up with.<\/p>\n\n\n\n<p>If you don&#8217;t do this already, use YouTube thumbnail images on your web site where you can. \u00a0It saves you the hassle of doing image management, and if you are loading more than one video on a page, you should be embedding the thumbnails and doing some Javascript work to load the YouTube video when a user chooses which they want to watch. \u00a0This will make your page load times SO much faster and more efficiently, and your visitors will love you for it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">YouTube Image URLs<\/h2>\n\n\n\n<p>The base URL to YouTube thumbnail image URL is&nbsp;<em><strong>http:\/\/img.youtube.com\/vi<\/strong><\/em>. The video ID and the image format&nbsp;need to be added to the URL as well.<\/p>\n\n\n\n<p>The full URL pattern looks like:<\/p>\n\n\n\n<p><em>http:\/\/img.youtube.com\/vi\/<strong>YouTubeID<\/strong>\/<strong>ImageFormat<\/strong>.jpg<\/em><\/p>\n\n\n\n<p>The <em><strong>YouTubeID<\/strong><\/em> is unique to the video you are using, so that&#8217;s up to you to find from the YouTube video it self.<\/p>\n\n\n\n<p>The <em><strong>ImageFormat<\/strong><\/em>&nbsp;portion of the URL can be chosen from the table below.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">webp image versions<\/h3>\n\n\n\n<p>You can also request images in the webp image format if you&#8217;d like. &nbsp;The same logic and image formats exist, you just need to use this alternate URL pattern.  <code>webp<\/code> images are highly optimized images and thus are smaller in file size.  This of course reduces page load time and makes a better user experience for website visitors.  <code>webp<\/code> is great for mobile devices and all major desktop browsers support <code>webp<\/code> as well now.<\/p>\n\n\n\n<p><em>http:\/\/img.youtube.com\/vi_webp\/<strong>YouTubeID<\/strong>\/<strong>ImageFormat<\/strong>.webp<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Alternate&nbsp;Domains<\/h3>\n\n\n\n<p>There are various domains that YouTube image thumbnail URLs can be requested from:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>http:\/\/img.youtube.com<\/li>\n\n\n\n<li>http:\/\/i.ytimg.com<\/li>\n\n\n\n<li>http:\/\/i3.ytimg.com<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">HTTPS<\/h3>\n\n\n\n<p>All of these URLs can and should be called from HTTPS instead of HTTP<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">YouTube Thumbnail Image Options<\/h2>\n\n\n\n<p>Some of the image formats add what I&#8217;m calling 16&#215;9 bars to the image. &nbsp;What I mean is that the image is in a 4&#215;3 aspect ratio (nearly square) yet the video it self is of a 16&#215;9 aspect ratio (rectangular). &nbsp;Because of this, black bars are added to the top and bottom of the 4&#215;3 image where the 16&#215;9 image leaves a void.<\/p>\n\n\n\n<p>When a video is uploaded to YouTube, YouTube will generate 3 thumbnail images and designates one of those as the default. &nbsp;The owner of the video can choose one of the other 2 images as the default. &nbsp;In addition, the owner can upload a custom thumbnail image and use that as the default thumbnail. &nbsp;In that scenario, images 1, 2, and 3 listed below are the three auto-generated images mentioned above, and image 0 would be the custom image uploaded (if set as default).<\/p>\n\n\n\n<p>If you know of any other image formats that I&#8217;m missing here, please comment below &#8211; I&#8217;d love for this to become a complete resource for all to use.<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th><strong>ImageFormat<\/strong><\/th><th><strong>Size<\/strong><\/th><th><strong>Resolution<\/strong><\/th><th><strong>16&#215;9 Bars<\/strong><\/th><th><strong>Default Image<\/strong><\/th><\/tr><\/thead><tbody><tr><td>0<\/td><td>480 x 360<\/td><td>High<\/td><td>Yes<\/td><td>Yes<\/td><\/tr><tr><td>1<\/td><td>120 x 90<\/td><td>Low<\/td><td>Yes<\/td><td>\n<p>No<\/p>\n<\/td><\/tr><tr><td>2<\/td><td>120 x 90<\/td><td>Low<\/td><td>Yes<\/td><td>No<\/td><\/tr><tr><td>3<\/td><td>120 x 90<\/td><td>Low<\/td><td>Yes<\/td><td>No<\/td><\/tr><tr><td>default<\/td><td>120 x 90<\/td><td>Low<\/td><td>Yes<\/td><td>Yes<\/td><\/tr><tr><td>mqdefault<\/td><td>320 x 180<\/td><td>Medium<\/td><td>No<\/td><td>\n<p>Yes<\/p>\n<\/td><\/tr><tr><td>hqdefault<\/td><td>480 x 360<\/td><td>High<\/td><td>Yes<\/td><td>Yes<\/td><\/tr><tr><td>sddefault<\/td><td>640 x 480<\/td><td>High<\/td><td>Yes<\/td><td>Yes<\/td><\/tr><tr><td>maxresdefault<\/td><td>\n<p>Matches the resolution of the uploaded video<\/p>\n<p>NOTE: May not be available for non-highres videos.<\/p>\n<\/td><td>Highest possible<\/td><td>No<\/td><td>Yes<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Removing the 16&#215;9 Bars<\/h2>\n\n\n\n<p>I&#8217;ve often wanted to use an image that has the 16&#215;9 bars on it, but don&#8217;t want to show the black bars. &nbsp;To do this, you&#8217;ll need to use the image as a background-image of an element, and use CSS to crop off the top and bottom bars.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>\n<h3>Original Image from YouTube<\/h3>\n<\/td><\/tr><tr><td><img decoding=\"async\" src=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/0.jpg\" alt=\"\"><\/td><\/tr><tr><td>\n<pre class=\"width-set:true width:100 width-unit:1 wrap:true lang:default decode:true\"><code>&lt;img src=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/0.jpg\" alt=\"\" \/&gt;<\/code><\/pre>\n<\/td><\/tr><tr><td>\n<h3>Background Image with Bars Hidden<\/h3>\n<\/td><\/tr><tr><td>\n<div style=\"background-image: url('https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/0.jpg');width: 480px;height: 270px\">&nbsp;<\/div>\n<\/td><\/tr><tr><td>\n<pre class=\"width-set:true width:100 width-unit:1 wrap:true lang:default decode:true\"><code>&lt;div style=\"background-image: url('https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/0.jpg'); width: 480px; height: 270px; background-position-y: -45px;\"&gt; &lt;\/div&gt;<\/code><\/pre>\n<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Example Embedded YouTube Thumbnail Images<\/h2>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th>ImageFormat<\/th><th>URL<\/th><th>Example<\/th><\/tr><\/thead><tbody><tr><td>0<\/td><td><a href=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/0.jpg\" target=\"_blank\" rel=\"noopener\" data-lasso-id=\"384\" data-rel=\"lightbox-gallery-H58AKy5i\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\">https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/0.jpg<\/a><\/td><td><img decoding=\"async\" src=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/0.jpg\" alt=\"\"><\/td><\/tr><tr><td>1<\/td><td><a href=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/1.jpg\" target=\"_blank\" rel=\"noopener\" data-lasso-id=\"385\" data-rel=\"lightbox-gallery-H58AKy5i\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\">https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/1.jpg<\/a><\/td><td><img decoding=\"async\" src=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/1.jpg\" alt=\"\"><\/td><\/tr><tr><td>2<\/td><td><a href=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/2.jpg\" target=\"_blank\" rel=\"noopener\" data-lasso-id=\"386\" data-rel=\"lightbox-gallery-H58AKy5i\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\">https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/2.jpg<\/a><\/td><td><img decoding=\"async\" src=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/2.jpg\" alt=\"\"><\/td><\/tr><tr><td>3<\/td><td><a href=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/3.jpg\" target=\"_blank\" rel=\"noopener\" data-lasso-id=\"387\" data-rel=\"lightbox-gallery-H58AKy5i\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\">https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/3.jpg<\/a><\/td><td><img decoding=\"async\" src=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/3.jpg\" alt=\"\"><\/td><\/tr><tr><td>default<\/td><td><a href=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/default.jpg\" target=\"_blank\" rel=\"noopener\" data-lasso-id=\"388\" data-rel=\"lightbox-gallery-H58AKy5i\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\">https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/default.jpg<\/a><\/td><td><img decoding=\"async\" src=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/default.jpg\" alt=\"\"><\/td><\/tr><tr><td>mqdefault<\/td><td><a href=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/mqdefault.jpg\" target=\"_blank\" rel=\"noopener\" data-lasso-id=\"389\" data-rel=\"lightbox-gallery-H58AKy5i\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\">https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/mqdefault.jpg<\/a><\/td><td><img decoding=\"async\" src=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/hqdefault.jpg\" alt=\"\"><\/td><\/tr><tr><td>hqdefault<\/td><td><a href=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/hqdefault.jpg\" target=\"_blank\" rel=\"noopener\" data-lasso-id=\"390\" data-rel=\"lightbox-gallery-H58AKy5i\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\">https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/hqdefault.jpg<\/a><\/td><td><img decoding=\"async\" src=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/hqdefault.jpg\" alt=\"\"><\/td><\/tr><tr><td>sddefault<\/td><td><a href=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/sddefault.jpg\" target=\"_blank\" rel=\"noopener\" data-lasso-id=\"391\" data-rel=\"lightbox-gallery-H58AKy5i\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\">https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/sddefault.jpg<\/a><\/td><td><img decoding=\"async\" src=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/sddefault.jpg\" alt=\"\"><\/td><\/tr><tr><td>maxresdefault<\/td><td><a href=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/maxresdefault-1.jpg\" target=\"_blank\" rel=\"noopener\" data-lasso-id=\"392\" data-rel=\"lightbox-gallery-H58AKy5i\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\">https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/maxresdefault-1.jpg<\/a><\/td><td><img decoding=\"async\" src=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/maxresdefault-1.jpg\" alt=\"\"><\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">Example of the different YouTube Image Thumbnail sizes and displays<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Other Options?<\/h2>\n\n\n\n<p>In YouTube itself, they use a URL like:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">https:\/\/i.ytimg.com\/vi\/gp66iFdRB1c\/hqdefault.jpg?custom=true&amp;w=196&amp;h=110&amp;stc=true&amp;jpg444=true&amp;jpgq=90&amp;sp=68&amp;sigh=LsmavCnhh0YCRQ0D-IW_vjDslqY<\/pre>\n\n\n\n<p>This is very intriguing &#8211; this would mean that you could actually come up with your own specifications to the image dimensions, etc. &nbsp;However you can&#8217;t just drop in any video ID and get the same results. &nbsp;It appears that the <strong>sigh<\/strong> query parameter is unique to this video or image. &nbsp;So determining what the <strong>sigh<\/strong> query parameter is would allow us to create our own URLs that mimic this pattern and thus give us full reign to define custom images.<\/p>\n\n\n\n<p>If anyone has more insight to what the&nbsp;<strong>sigh<\/strong> parameter is and how to set it I&#8217;d LOVE to hear from you. &nbsp;Please comment below with your input.<\/p>","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve always known there were a few different URLs to jpeg images of your YouTube videos, but I&#8217;ve [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":854,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wprm-recipe-roundup-name":"","wprm-recipe-roundup-description":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[4,5],"tags":[524],"class_list":["post-845","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-photo-video","category-website-development","tag-youtube"],"jetpack_featured_media_url":"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2015\/06\/maxresdefault.jpg","jetpack_shortlink":"https:\/\/wp.me\/p4BbcR-dD","jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/posts\/845","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/comments?post=845"}],"version-history":[{"count":15,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/posts\/845\/revisions"}],"predecessor-version":[{"id":3584,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/posts\/845\/revisions\/3584"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/media\/854"}],"wp:attachment":[{"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/media?parent=845"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/categories?post=845"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/tags?post=845"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}