Choose YouTube preview image resolution
If you are using the LazyLoad sub-option Replace YouTube iframe with preview image, you can specify the resolution of the preview thumbnail using the helper plugin available in this article.
Heads up! You need to modify the plugin’s PHP file first, to specify which resolution to use.
Possible values are: default
(default image), mqdefault
(medium size thumbnail), sddefault
(high size thumbnail), hqdefault
(standard size), maxresdefault
(maximum resolution available).
This helper plugin allows you to specify the preview image resolution. The thumbnails are pulled from YouTube, you don’t need to specify your own image.
📥 Download (.zip): WP Rocket | YouTube Preview Image Resolution
Developers: You can find the code for this plugin on GitHub.
To install the plugin please follow these steps:
- Download the helper plugin ZIP file.
- Customize the plugin's code for the required resolution, as explained above.
- Install the helper plugin on your site - go to Plugins → Add New → Upload plugin and select the zip file.
- Activate the plugin
- Clear WP Rocket's cache