Skip to content

Commit 9888af1

Browse files
committed
Update Media model, fix thumbnail cdn paths
1 parent b8ad594 commit 9888af1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/Media.php

+4
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ public function thumbnailUrl()
5656
return url(Storage::url($this->thumbnail_path));
5757
}
5858

59+
if($this->remote_media && !$this->thumbnail_path && $this->cdn_url) {
60+
return $this->cdn_url;
61+
}
62+
5963
if($this->media_path && $this->mime && in_array($this->mime, ['image/jpeg', 'image/png'])) {
6064
return $this->remote_media || Str::startsWith($this->media_path, 'http') ?
6165
$this->media_path :

0 commit comments

Comments
 (0)