0
0
Fork 0

Use preview image in <ImageLoader /> to provide immediate visual feedback (#3595)

before the full-size image is loaded
This commit is contained in:
Eugen Rochko 2017-06-06 19:30:17 +02:00 committed by GitHub
parent 722d152082
commit b623dd12c1
3 changed files with 44 additions and 16 deletions

View file

@ -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} />;
}