Wordpress: Embed YouTube HD videos
Wordpress supports auto-embeds: certain links are automatically converted into embed widgets. Embedding YouTube videos is done by simply pasting the URL. Unfortunately the video quality is low by default. It’s possible to specify the quality using the
vq parameter. Auto-embeds don’t support parameters, though. There is a way to manipulate the generated html code by adding parameters to each embedded YouTube video automatically.
Just add the following code to
functions.php in your theme folder:
The parameters explained:
rel=0- Hides related videos.
vq=hd1080- Forces a 1080p quality. Uses the best quality, if 1080p is not available.
This method is deprecated. Currently there is no official method to force HD resolution in embedded YouTube videos.
It’s now possible to force HD videos again.
The first method is to use
embed instead of