Get blob url from blob.
npm install -S @jswork/next-blob2url
import '@jswork/next-blob2url';
nx.blob2url(blob);
// http://localhost:5000/500e570a-ad09-4921-a4a3-6c72cc84626e
<div class="img-container">
<img id="img" src="" alt="">
</div>
<script>
fetch('./ava.jpg').then(res => res.blob()).then(res => {
const url = nx.blob2url(res);
document.getElementById('img').src = nx.blob2url(res)
console.log(res, url);
})
</script>
Code released under the MIT license.