Skip to content

Commit

Permalink
support url query for thumbnails
Browse files Browse the repository at this point in the history
  • Loading branch information
fr0tt committed Oct 6, 2023
1 parent 54371ca commit d4773f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Services/PostService.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ public function getInfo(string $url, $act_as_bot = false)
$color = $meta->getAttribute('content');
} else if ($meta->getAttribute('property') === 'og:image') {
if ($meta->getAttribute('content') != '') {
$image_path = $meta->getAttribute('content');
if (parse_url($image_path)['path'] === $image_path) {
$image_path = $meta->getAttribute('content');
if (Str::startsWith($image_path, parse_url($image_path)['path'])) {
$image_path = $this->composeImagePath($image_path, $base_url, $url);
}
}
Expand Down Expand Up @@ -380,7 +380,7 @@ public function crawlWithChrome(string $filename, string $path, string $url, int
}

if (!empty($imagePathOG)) {
// if crawling the website with chromium reveals an already
// if crawling the website with chromium reveals an already
// existing thumbnail, use it instead
$imagePath = $imagePathOG;
} else {
Expand Down

0 comments on commit d4773f3

Please sign in to comment.