From b344a797c76f94f601c11194fb66ce1f19cf96ed Mon Sep 17 00:00:00 2001 From: Bob den Otter Date: Wed, 5 Oct 2022 13:36:43 +0200 Subject: [PATCH] Better handling of 'default image' if no specific image given or configured --- src/Seo/Seo.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Seo/Seo.php b/src/Seo/Seo.php index 9b3053a..8724b60 100644 --- a/src/Seo/Seo.php +++ b/src/Seo/Seo.php @@ -246,9 +246,13 @@ public function image(): string if(isset($this->config['default']['image'])) { return $this->cleanUp($this->config['default']['image']); - } else { - return ''; } + + if (!empty($this->record->getExtras()['image'])) { + return $this->record->getExtras()['image']['url']; + } + + return ''; } public function canonical(): string