Suppose I have the entire Base64 string for an image that is generated dynamically. How can I convert something like this:
<img src="data:image/jpeg;base64,/9j/blah blah blah........." />
to
<img src="mypic.jpg" />
Is it even possible to do on the client side without downloading the image to the server? Is there maybe a way to temporarily cache the Base64 image into memory and receive an actual image file?
No.
Assuming the page is loaded from the server, then changing the
srcattribute like that would point it at a URI on that server. The browser would try to load the image from there, so it would have to return the image and not 404.There is no way to for a website to inject content for an arbitrary URI into the browser cache.