Commit 33aae1f7 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

fix: add open graph size for podcast images to replace the inadequate large format

parent 67b73c15
Pipeline #1231 passed with stages
in 9 minutes and 24 seconds
......@@ -82,6 +82,10 @@ class Images extends BaseConfig
'width' => 500,
'height' => 500,
],
'og' => [
'width' => 1200,
'height' => 1200,
],
'federation' => [
'width' => 400,
'height' => 400,
......
......@@ -51,10 +51,10 @@ if (! function_exists('get_podcast_metatags')) {
$metatags
->title(' ' . $podcast->title . " (@{$podcast->handle})" . ' • ' . lang('Podcast.' . $page))
->description(htmlspecialchars($podcast->description))
->image((string) $podcast->cover->large_url)
->image((string) $podcast->cover->og_url)
->canonical((string) current_url())
->og('image:width', (string) config('Images')->podcastCoverSizes['large']['width'])
->og('image:height', (string) config('Images')->podcastCoverSizes['large']['height'])
->og('image:width', (string) config('Images')->podcastCoverSizes['og']['width'])
->og('image:height', (string) config('Images')->podcastCoverSizes['og']['height'])
->og('locale', $podcast->language_code)
->og('site_name', service('settings')->get('App.siteName'))
->push('link', [
......@@ -98,11 +98,11 @@ if (! function_exists('get_episode_metatags')) {
$metatags
->title($episode->title)
->description(htmlspecialchars($episode->description))
->image((string) $episode->cover->large_url, 'player')
->image((string) $episode->cover->og_url, 'player')
->canonical($episode->link)
->og('site_name', service('settings')->get('App.siteName'))
->og('image:width', (string) config('Images')->podcastCoverSizes['large']['width'])
->og('image:height', (string) config('Images')->podcastCoverSizes['large']['height'])
->og('image:width', (string) config('Images')->podcastCoverSizes['og']['width'])
->og('image:height', (string) config('Images')->podcastCoverSizes['og']['height'])
->og('locale', $episode->podcast->language_code)
->og('audio', $episode->audio_opengraph_url)
->og('audio:type', $episode->audio->file_mimetype)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment