about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/ui/components/media_modal.js
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-06-06 19:30:17 +0200
committerGitHub <noreply@github.com>2017-06-06 19:30:17 +0200
commitb623dd12c1eea2a78d1010d20ac8b31431d56501 (patch)
tree136f662b29c6f7120dc07cac6fca7de058cac67e /app/javascript/mastodon/features/ui/components/media_modal.js
parent722d152082a20c96ca6f1db92c172f9d3772d737 (diff)
Use preview image in <ImageLoader /> to provide immediate visual feedback (#3595)
before the full-size image is loaded
Diffstat (limited to 'app/javascript/mastodon/features/ui/components/media_modal.js')
-rw-r--r--app/javascript/mastodon/features/ui/components/media_modal.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/ui/components/media_modal.js b/app/javascript/mastodon/features/ui/components/media_modal.js
index f94c76a21..cff1a0cf5 100644
--- a/app/javascript/mastodon/features/ui/components/media_modal.js
+++ b/app/javascript/mastodon/features/ui/components/media_modal.js
@@ -73,7 +73,7 @@ class MediaModal extends ImmutablePureComponent {
     }
 
     if (attachment.get('type') === 'image') {
-      content = <ImageLoader src={url} />;
+      content = <ImageLoader previewSrc={attachment.get('preview_url')} src={url} width={attachment.getIn(['meta', 'original', 'width'])} height={attachment.getIn(['meta', 'original', 'height'])} />;
     } else if (attachment.get('type') === 'gifv') {
       content = <ExtendedVideoPlayer src={url} muted controls={false} />;
     }