From 9947050bdf7c0722db9ece1bf0639d414b8e5fbc Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 5 Mar 2020 14:44:50 -0700 Subject: [PATCH 1/2] Update Media model, fix remote media preview --- app/Media.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Media.php b/app/Media.php index 8c3de944b..2bc1d0334 100644 --- a/app/Media.php +++ b/app/Media.php @@ -42,8 +42,12 @@ class Media extends Model public function thumbnailUrl() { - $path = $this->thumbnail_path ?? 'public/no-preview.png'; - return url(Storage::url($path)); + 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() From ab5a3319d209daf92d162487d81a90d76e0054b2 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 5 Mar 2020 14:45:35 -0700 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dbd114018..2642f52cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ - Updated BaseApiController, invalidate session after account deletion ([826978ce](https://github.com/pixelfed/pixelfed/commit/826978ce)) - Updated AdminUserController, add account deletion handler ([9be19ad8](https://github.com/pixelfed/pixelfed/commit/9be19ad8)) - Updated ContactController, fixes #2042 ([c9057e87](https://github.com/pixelfed/pixelfed/commit/c9057e87)) +- Updated Media model, fix remote media preview ([9947050b](https://github.com/pixelfed/pixelfed/commit/9947050b)) ## [v0.10.8 (2020-01-29)](https://github.com/pixelfed/pixelfed/compare/v0.10.7...v0.10.8) ### Added