summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamantaz Fox <coding@samantaz.fr>2024-07-10 22:17:45 +0200
committerSamantaz Fox <coding@samantaz.fr>2024-07-10 22:17:45 +0200
commite9bab06e907779eea2abf0bb214c139a426efda3 (patch)
tree2ffd212180ab43909df15b0dba1daca1c099beff
parenta56a724a55139b160ed53c8f16965ad434b62add (diff)
parent9d66676f2dbb18a87ca7515e839f1c64688ecd39 (diff)
downloadinvidious-e9bab06e907779eea2abf0bb214c139a426efda3.tar.gz
invidious-e9bab06e907779eea2abf0bb214c139a426efda3.tar.bz2
invidious-e9bab06e907779eea2abf0bb214c139a426efda3.zip
HTML: Use full URL in the og:image property (#4675)
Some opengraph implementations don't support a URL without the domain therefore failing to fetch the video thumbnail and channel image. This pull request basically fixes that.
-rw-r--r--src/invidious/views/channel.ecr4
-rw-r--r--src/invidious/views/watch.ecr2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/invidious/views/channel.ecr b/src/invidious/views/channel.ecr
index 09df106d..a84e44bc 100644
--- a/src/invidious/views/channel.ecr
+++ b/src/invidious/views/channel.ecr
@@ -30,13 +30,13 @@
<meta property="og:site_name" content="Invidious">
<meta property="og:url" content="<%= HOST_URL %>/channel/<%= ucid %>">
<meta property="og:title" content="<%= author %>">
-<meta property="og:image" content="/ggpht<%= channel_profile_pic %>">
+<meta property="og:image" content="<%= HOST_URL %>/ggpht<%= channel_profile_pic %>">
<meta property="og:description" content="<%= channel.description %>">
<meta name="twitter:card" content="summary">
<meta name="twitter:url" content="<%= HOST_URL %>/channel/<%= ucid %>">
<meta name="twitter:title" content="<%= author %>">
<meta name="twitter:description" content="<%= channel.description %>">
-<meta name="twitter:image" content="/ggpht<%= channel_profile_pic %>">
+<meta name="twitter:image" content="<%= HOST_URL %>/ggpht<%= channel_profile_pic %>">
<link rel="alternate" type="application/rss+xml" title="RSS" href="/feed/channel/<%= ucid %>" />
<%- end -%>
diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr
index 7a1cf2c3..9e7467dd 100644
--- a/src/invidious/views/watch.ecr
+++ b/src/invidious/views/watch.ecr
@@ -10,7 +10,7 @@
<meta property="og:site_name" content="<%= author %> | Invidious">
<meta property="og:url" content="<%= HOST_URL %>/watch?v=<%= video.id %>">
<meta property="og:title" content="<%= title %>">
-<meta property="og:image" content="/vi/<%= video.id %>/maxres.jpg">
+<meta property="og:image" content="<%= HOST_URL %>/vi/<%= video.id %>/maxres.jpg">
<meta property="og:description" content="<%= HTML.escape(video.short_description) %>">
<meta property="og:type" content="video.other">
<meta property="og:video:url" content="<%= HOST_URL %>/embed/<%= video.id %>">