Fetch YouTube Cover Images

GeekThis happily runs on Vultr. Get $300 of free hosting credits to try out their cloud compute, kubernetes engine, or managed databases. Try Vultr today to claim your free $300.

With the not so new YouTube Layout now, you may need to grab a banner on someones page for one reason or another. This took me a little bit of time to figure out and I didn’t see it posted anywhere else, so what better place to post it than here. So far, I have found 4 different sizes that seem to cover all of the available screen types. Desktop, Mobile, Tablet and TV. If you want to see the full cover image with the highest resolution, look at the TV images.

Getting The Cover Images

  1. Copy the URL https://www.youtube.com/feeds/videos.xml?user=geekthisnet into a new tab. Replace the username “geekthisnet” with the username you want to fetch the cover image of.
  2. Find the Channel ID from the RSS feed of the page you just visited. The channel id will be located inside the tag <yt:channelId>. For GeekThisNet, the channel ID is jdbOdrjTVonDK9CwZKlhAg. You have to remove the first two characters of UC from the beginning of the Channel ID to get the real channel ID.
Image Names:
Mobile:    channels4_mobile_banner.jpg
Desktop:   channels4_banner.jpg
TV:        channels4_tv_banner.jpg
Tablet:    channels4_tablet_banner.jpg

Resolutions:
Mobile:    640 x 176
Desktop:   1060 x 176
TV:        2120 x 1194
Tablet:    1707 x 283

Final URL:
http://i.ytimg.com/u/CHANNEL_ID/THE_IMAGE_NAME

GeekThis URL Example:
Mobile:    http://i.ytimg.com/u/jdbOdrjTVonDK9CwZKlhAg/channels4_mobile_banner.jpg
Desktop:   http://i.ytimg.com/u/jdbOdrjTVonDK9CwZKlhAg/channels4_banner.jpg
TV:        http://i.ytimg.com/u/jdbOdrjTVonDK9CwZKlhAg/channels4_tv_banner.jpg
Tablet:    http://i.ytimg.com/u/jdbOdrjTVonDK9CwZKlhAg/channels4_tablet_banner.jpg

The reason the tablet resolution is so high is for retina displays. The resolution has to be doubled the regual resolution because there are more pixels per inch. The Final URL has two strings to be replaced. The channel_id and the image name. The image name are those listed next to the devices.

Related Posts

Monitor Website Status with Twitter

Add another monitoring method for your site by monitoring Twitter in real time. This small Go script will display all tweets that mention any of the terms you want to track.

Website Admin Panel on Private Network

Split your website into two parts, administrative and public access. This post talks a little about having your website's control panel on your private network as apposed to publicly available.

How to Separately Handle Multiple Website Deployments

Learn how to configure your computer to run multiple website deployments with rsync and multiple Linux accounts.

Backup Evolution using the Terminal

Learn how to backup all of your Evolution data through the terminal by using a simple command. There is no longer a need to open Evolution to perform backups.