diff --git a/src/components/widget/Image.js b/src/components/widget/Image.js
index 166448ada..a3ae6120a 100644
--- a/src/components/widget/Image.js
+++ b/src/components/widget/Image.js
@@ -1,5 +1,16 @@
import React, { Component } from 'react';
import { getImageAction, postImageAction } from '../../actions/AppActions';
+import Loader from '../app/Loader';
+
+const Placeholder = (props) => (
+
+);
class Image extends Component{
constructor(props){
@@ -185,6 +196,26 @@ class Image extends Component{
Take from camera
}
+
+ renderImagePreview() {
+ const {isLoading, imageSrc} = this.state;
+ const {fields} = this.props;
+
+ if(isLoading)
+ return
+ else if(imageSrc)
+ return (
+
+
+
+ );
+ else
+ return {fields[0].emptyText}
+ }
render(){
const { imageSrc, usingCamera } = this.state;
@@ -196,21 +227,7 @@ class Image extends Component{
onKeyDown={this.handleKeyDown}
tabIndex={0}
>
- {imageSrc ?
-
-
-
- :
-
-
{fields[0].emptyText}
-
- }
+ {this.renderImagePreview()}
{usingCamera && this.renderVideoPreview()}