title: How to convert blob to image and display it on React?
body: <p>i have some png images stored as blob in a database and i am trying to get these blob data and convert them to url.</p>
  <pre><code>&lt;Popup trigger={openPopup} setTrigger={setPopup}&gt;
      &lt;img src={setBlobImages(photoBlob)} /&gt;
  &lt;/Popup&gt;
  </code></pre>
  <pre><code>function setBlobImages(photo){
      if(photo === undefined){
          console.log(&quot;undefined&quot;);
          return undefined
      }
      else{
          console.log(&quot;value&quot;)
          var binaryData = [];
          binaryData.push(photo);
          return URL.createObjectURL(new Blob(binaryData))
      }
  }
  </code></pre>
  <p>The result:
  <a href="https://i.stack.imgur.com/AsIL0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AsIL0.png" alt="enter image description here" /></a></p>
  <p>How can i make this work? Thank you for your answers.</p>