title: Can't display base64 image in react?
body: <p>I recieve the data from server. I encoded the console log result with an online tool and it is correct.</p>
  <pre><code>axios.get(`https://localhost:44348/api/user/GetFirstImage`)
        .then(res =&gt; {
          const img = res.data;
          this.setState({base64File: &quot;data:image/png;base64,&quot; + img});
          console.log(this.state.base64File);
        })
  </code></pre>
  <p>Then I try to display it in render return (I found this two solutions but neither of them works, I get the default no-image placeholder):</p>
  <pre><code>&lt;img src={{uri: `data:image/gif;base64,${this.state.base64File}`}} /&gt;
  &lt;img data-ng-src=&quot;data:image/png;base64,{{this.state.base64FileOnlyData}}&quot;/&gt;
  </code></pre>
  <p>I really have no more ideas, thank you for your help!</p>