diff --git a/app/javascript/flavours/glitch/components/media_gallery.js b/app/javascript/flavours/glitch/components/media_gallery.js
index 309308d25a..a2219378eb 100644
--- a/app/javascript/flavours/glitch/components/media_gallery.js
+++ b/app/javascript/flavours/glitch/components/media_gallery.js
@@ -225,21 +225,35 @@ export default class MediaGallery extends React.PureComponent {
this.props.onOpenMedia(this.props.media, index);
}
+ isStandaloneEligible() {
+ const { media, standalone } = this.props;
+ return standalone && media.size === 1 && media.getIn([0, 'meta', 'small', 'aspect']);
+ }
+
render () {
- const {
- handleClick,
- handleOpen,
- } = this;
- const {
- fullwidth,
- intl,
- letterbox,
- media,
- sensitive,
- standalone,
- } = this.props;
+ const { media, intl, sensitive, letterbox, fullwidth } = this.props;
const { visible } = this.state;
const size = media.take(4).size;
+
+ let children;
+
+ if (!visible) {
+ let warning =