mardi 20 avril 2021

Can a React app return an image string that can be read into the SRC attribute of a tag?

Is it possible to reference a React App that is running on another server using <img src="https://www.react_app.com">

The idea is that the React App returns an image string (or similar) like this: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgA ... So that it can be read in a <img src=""> tag? The main question is what React code simply sends back a request with the string so that it can be read in src=""?

Also is there a timeout for how long an <img src=""> attempts to fetch an image?




Aucun commentaire:

Enregistrer un commentaire