From 5b24ac05037956e8086f00e3ec91e5fc1d264387 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 12 May 2021 20:07:59 -0500 Subject: [PATCH] Only letterbox media without an aspect ratio --- app/soapbox/components/media_gallery.js | 7 ++++--- app/styles/components/media-gallery.scss | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/soapbox/components/media_gallery.js b/app/soapbox/components/media_gallery.js index ff01de852..b526655a3 100644 --- a/app/soapbox/components/media_gallery.js +++ b/app/soapbox/components/media_gallery.js @@ -157,13 +157,14 @@ class Item extends React.PureComponent { ); } else if (attachment.get('type') === 'image') { - const previewUrl = attachment.get('preview_url'); + const previewUrl = attachment.get('preview_url'); - const originalUrl = attachment.get('url'); + const originalUrl = attachment.get('url'); + const letterboxed = !attachment.getIn(['meta', 'original', 'aspect']); thumbnail = (