import getBase64FromUrl from 'base64-from-url'// getBase64FromUrl('url').then(function (res) { // => base64 console.log(res.data)})
<script src="base64-from-url"></script><script> getBase64FromUrl('url').then(function (res) { // => base64 console.log(res.data) })</script>