// Try to get the resource URL from the persistent cache.
$cache_id = "media:oembed_resource_url:
$url:
$max_width:
$max_height";
$cached =
$this->cacheBackend->
get($cache_id);
if ($cached) { $this->urlCache
[$url] =
$cached->data;
return $this->urlCache
[$url];
} $provider =
$this->
getProviderByUrl($url);
$resource_url =
$this->
getEndpointMatchingUrl($url,
$provider);
$parsed_url = UrlHelper::
parse($resource_url);
if ($max_width) { $parsed_url['query'
]['maxwidth'
] =
$max_width;
} if ($max_height) { $parsed_url['query'
]['maxheight'
] =
$max_height;
} // Let other modules alter the resource URL, because some oEmbed providers
// provide extra parameters in the query string. For example, Instagram also