Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291721

Add a hook to modify oEmbed resource data

$
0
0

I want to fetch the max resolution thumbnail from YouTube (1280x720), but OEmbed is providing only the the 480x360 thumbnail URL and there is currently no way to override that. Could a hook be provided to alter the OEmbed data? Currently one can only change the OEmbed url via hook_oembed_resource_url_alter().

{
  "author_url": "https://www.youtube.com/user/ZackScott",
  "provider_name": "YouTube",
  "height": 270,
  "thumbnail_width": 480,
  "thumbnail_height": 360,
  "width": 480,
  "version": "1.0",
  "html": "<iframe width=\"480\" height=\"270\" src=\"https://www.youtube.com/embed/M3r2XDceM6A?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>",
  "title": "Amazing Nintendo Facts",
  "provider_url": "https://www.youtube.com/",
  "thumbnail_url": "https://i.ytimg.com/vi/M3r2XDceM6A/hqdefault.jpg",
  "author_name": "ZackScott",
  "type": "video"
}

Viewing all articles
Browse latest Browse all 291721

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>