javascript - change image from path to embedded -


i have html image

<img src="/path/to/my/image.png" /> 

i want same content, embedded image

<img src="data:image/png:base64/xyzafasfasfafasfafasfasag"> 

can transformation javascript?

html: <img src="/path/..." id="image">

js: document.getelementbyid('image').src = 'data:image/png:base64/qweqwe...';


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -