mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
Update Media model, fix remote media preview
This commit is contained in:
parent
eeca1fbc54
commit
9947050bdf
1 changed files with 6 additions and 2 deletions
|
@ -42,9 +42,13 @@ class Media extends Model
|
|||
|
||||
public function thumbnailUrl()
|
||||
{
|
||||
if($this->remote_media == true) {
|
||||
return $this->remote_url;
|
||||
} else {
|
||||
$path = $this->thumbnail_path ?? 'public/no-preview.png';
|
||||
return url(Storage::url($path));
|
||||
}
|
||||
}
|
||||
|
||||
public function thumb()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue