forked from mirror/pixelfed
commit
00ddc40c9b
2 changed files with 7 additions and 0 deletions
|
@ -114,6 +114,7 @@
|
|||
- Updated ApiV1Controller, remove no-preview image from media urls. ([37dfb101](https://github.com/pixelfed/pixelfed/commit/37dfb101))
|
||||
- Updated DeleteAccountPipeline, fix perf issues. ([a9edd93f](https://github.com/pixelfed/pixelfed/commit/a9edd93f))
|
||||
- Updated DeleteAccountPipeline, improve coverage. ([4870cc3b](https://github.com/pixelfed/pixelfed/commit/4870cc3b))
|
||||
- Updated media model, use original photo url for non-existent thumbnails. ([9b04b9d8](https://github.com/pixelfed/pixelfed/commit/9b04b9d8))
|
||||
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
||||
|
||||
## [v0.11.2 (2022-01-09)](https://github.com/pixelfed/pixelfed/compare/v0.11.1...v0.11.2)
|
||||
|
|
|
@ -55,6 +55,12 @@ 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 $this->remote_media || Str::startsWith($this->media_path, 'http') ?
|
||||
$this->media_path :
|
||||
url(Storage::url($this->media_path));
|
||||
}
|
||||
|
||||
return url(Storage::url('public/no-preview.png'));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue