Is it possible to convert a svg image to png in the browser address bar?

Hello.
Prompt, please, who knows.
Given: a simple svg image as a string.
Is it possible to convert a svg image to png in the browser address bar?
Ie enter in one line of code, the result of which would be url converted to raster the vector image.
I hope I'm not asking for the impossible.
Thank you.
March 12th 20 at 07:56
2 answers
March 12th 20 at 07:58
Solution
It https://css-tricks.com/lodge/svg/09-svg-data-uris/ you need?

UPD: obviously not it, you want PNG. But maybe you can solve their problem and so
Thank you. What you need. Great video. I wonder which of the four options smaller ship the browser if these images will be a few thousand. - Emerson54 commented on March 12th 20 at 08:01
March 12th 20 at 08:00
Why not?
You can Google and find some ready code to convert. I like what I found but not tested yet, https://stackoverflow.com/questions/4809194/conver...
Your task is only to as a GET parameter to accept a reference to the SVG, send the file through the script and give the automatically generated address reference to a png file.
Interesting, thank you.
But what if I want to do this on the client? I.e. to include in the dom not a lot of svg images, and the img src in the transformed image. - Emerson54 commented on March 12th 20 at 08:03

Find more questions by tags SVGPNGImagesJavaScript