Skip to content

Instantly share code, notes, and snippets.

@fago
Created January 15, 2022 16:53
Show Gist options
  • Save fago/ffab920344a2214fe993da9d83b0ec10 to your computer and use it in GitHub Desktop.
Save fago/ffab920344a2214fe993da9d83b0ec10 to your computer and use it in GitHub Desktop.
#3246958
From c351ed55488c7a276a9e3be04ccf1b8276ae17d1 Mon Sep 17 00:00:00 2001
From: MilanG <[email protected]>
Date: Mon, 1 Nov 2021 10:53:08 +0100
Subject: [PATCH] Changing protocol HTTP -> HTTPS for YouTube remote thumbnail
image path.
---
src/Plugin/video_embed_field/Provider/YouTube.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Plugin/video_embed_field/Provider/YouTube.php b/src/Plugin/video_embed_field/Provider/YouTube.php
index 224edd2..8f5dabd 100644
--- a/src/Plugin/video_embed_field/Provider/YouTube.php
+++ b/src/Plugin/video_embed_field/Provider/YouTube.php
@@ -71,7 +71,7 @@ class YouTube extends ProviderPluginBase {
* {@inheritdoc}
*/
public function getRemoteThumbnailUrl() {
- $url = 'http://img.youtube.com/vi/%s/%s.jpg';
+ $url = 'https://img.youtube.com/vi/%s/%s.jpg';
$high_resolution = sprintf($url, $this->getVideoId(), 'maxresdefault');
$backup = sprintf($url, $this->getVideoId(), 'mqdefault');
try {
--
GitLab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment