Use YouTube thumbnail as featured image (without hosting the image yourself)
-
Hello,
In order to save some disk space, I would like to modify the featured image in posts. A post contains a YouTube video, and right now a plugin gets the thumbnail and sets it as featured image. However, it downloads the image and I need to host it on my website. There are a lot of videos on my website so this takes a lot of disk space…
How can I automatically set the thumbnail of the YouTube video in the post as featured image? The thumbnails are hosted on YouTube and can be found on this link: https://i1.ytimg.com/vi/{Video ID}/mqdefault.jpg, for example: https://i1.ytimg.com/vi/IV-56wObElQ/mqdefault.jpg
So actually I need to know how to modify the featured image and how to get the video ID of the video in the post. Is this possible? I hope someone can help, thank you very much!
- The topic ‘Use YouTube thumbnail as featured image (without hosting the image yourself)’ is closed to new replies.