Skip to content

Commit

Permalink
Merge pull request #25 from bobdenotter/patch-1
Browse files Browse the repository at this point in the history
Better handling of 'default image' if no specific image given or configured
  • Loading branch information
Fredxd authored Oct 5, 2022
2 parents 3f6fdf5 + b344a79 commit 9a97a7e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Seo/Seo.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9a97a7e

Please sign in to comment.