Articles on: Developers

Change YouTube placeholder resolution

When "Use placeholder images for YouTube videos" is enabled, the default resolution for the placeholder image is "hqdefault".

The other available resolutions in YouTube are:
- default
- mqdefault
- hqdefault
- sddefault
- maxresdefault

You can change resolution using the filter flying_press_youtube_placeholder_resolution.

Change resolution to maxresdefault



add_filter('flying_press_youtube_placeholder_resolution', function () {
  return 'maxresdefault';
});

Updated on: 18/12/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!