From f85559165193def32ba4deb5a49ba5e5276c9cf2 Mon Sep 17 00:00:00 2001 From: Frederik Niedernolte Date: Fri, 13 May 2022 11:18:46 +0200 Subject: [PATCH 1/2] More fallbacks for Open Graph and Twitter images I have added more fallback options for the current page images for Open Graph and Twitter. --- snippets/meta_information.php | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/snippets/meta_information.php b/snippets/meta_information.php index a10d868..dc4f476 100644 --- a/snippets/meta_information.php +++ b/snippets/meta_information.php @@ -82,10 +82,18 @@ -og_image()->toFile() ?? $site->og_image()->toFile()): ?> - - - +og_image()->isNotEmpty()): ?> + + + +cover()->toFile() ?? $page->image()): ?> + + + +og_image()->isNotEmpty()): ?> + + + @@ -131,8 +139,12 @@ -twitter_image()->toFile() ?? $site->twitter_image()->toFile()): ?> - +twitter_image()->isNotEmpty()): ?> + +cover()->toFile() ?? $page->image()): ?> + +twitter_image()->isNotEmpty()): ?> + From 1c6d64965e03035fb5e1182a406ef0f265471225 Mon Sep 17 00:00:00 2001 From: Frederik Niedernolte Date: Fri, 13 May 2022 11:25:25 +0200 Subject: [PATCH 2/2] Update meta_information.php --- snippets/meta_information.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/snippets/meta_information.php b/snippets/meta_information.php index dc4f476..c8c89cc 100644 --- a/snippets/meta_information.php +++ b/snippets/meta_information.php @@ -86,10 +86,10 @@ -cover()->toFile() ?? $page->image()): ?> - - - + meta_image()->toFile() ?? $page->image()): ?> + + + og_image()->isNotEmpty()): ?> @@ -141,8 +141,8 @@ twitter_image()->isNotEmpty()): ?> -cover()->toFile() ?? $page->image()): ?> - +meta_image()->toFile() ?? $page->image()): ?> + twitter_image()->isNotEmpty()): ?>