From e66ed9a222e44ec10478ba2e6b710d79507e70e2 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 30 Apr 2021 00:19:45 -0600 Subject: [PATCH 1/2] Update StoryController, optimize photo size by resizing to 9:16 aspect --- app/Http/Controllers/StoryController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Http/Controllers/StoryController.php b/app/Http/Controllers/StoryController.php index 5f77d5d43..7398f7f10 100644 --- a/app/Http/Controllers/StoryController.php +++ b/app/Http/Controllers/StoryController.php @@ -130,6 +130,9 @@ class StoryController extends Controller if($story->type === 'photo') { $img = Intervention::make($path); $img->crop($width, $height, $x, $y); + $img->resize(1080, 1920, function ($constraint) { + $constraint->aspectRatio(); + }); $img->save($path, config('pixelfed.image_quality')); } From 86a1c5a6036c7e0f8423d45a258f7220d716a0df Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 30 Apr 2021 00:20:14 -0600 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a1f75eca..91f47ff4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -73,6 +73,7 @@ - Updated StoryCompose component, improve full screen preview. ([39a76103](https://github.com/pixelfed/pixelfed/commit/39a76103)) - Updated Helpers, fix broken tests. ([22dddaa0](https://github.com/pixelfed/pixelfed/commit/22dddaa0)) - Updated StoryController, fix cache crop bug. ([c2f8faae](https://github.com/pixelfed/pixelfed/commit/c2f8faae)) +- Updated StoryController, optimize photo size by resizing to 9:16 aspect. ([e66ed9a2](https://github.com/pixelfed/pixelfed/commit/e66ed9a2)) - ([](https://github.com/pixelfed/pixelfed/commit/)) ## [v0.10.10 (2021-01-28)](https://github.com/pixelfed/pixelfed/compare/v0.10.9...v0.10.10)