mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
Update media model, use original photo url for non-existent thumbnails
This commit is contained in:
parent
2533bd51a9
commit
9b04b9d897
1 changed files with 4 additions and 0 deletions
|
@ -55,6 +55,10 @@ class Media extends Model
|
|||
return url(Storage::url($this->thumbnail_path));
|
||||
}
|
||||
|
||||
if($this->media_path && $this->mime && in_array($this->mime, ['image/jpeg', 'image/png'])) {
|
||||
return url(Storage::url($this->media_path));
|
||||
}
|
||||
|
||||
return url(Storage::url('public/no-preview.png'));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue