1
0
Fork 0
forked from mirror/pixelfed

Merge pull request #3344 from pixelfed/staging

Staging
This commit is contained in:
daniel 2022-03-30 23:52:11 -06:00 committed by GitHub
commit 00ddc40c9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View file

@ -114,6 +114,7 @@
- Updated ApiV1Controller, remove no-preview image from media urls. ([37dfb101](https://github.com/pixelfed/pixelfed/commit/37dfb101)) - 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, fix perf issues. ([a9edd93f](https://github.com/pixelfed/pixelfed/commit/a9edd93f))
- Updated DeleteAccountPipeline, improve coverage. ([4870cc3b](https://github.com/pixelfed/pixelfed/commit/4870cc3b)) - 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/)) - ([](https://github.com/pixelfed/pixelfed/commit/))
## [v0.11.2 (2022-01-09)](https://github.com/pixelfed/pixelfed/compare/v0.11.1...v0.11.2) ## [v0.11.2 (2022-01-09)](https://github.com/pixelfed/pixelfed/compare/v0.11.1...v0.11.2)

View file

@ -55,6 +55,12 @@ class Media extends Model
return url(Storage::url($this->thumbnail_path)); 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')); return url(Storage::url('public/no-preview.png'));
} }