+ 2

Is there any way, we can download a div as an image?

I want a method to download a div (text and image in it) as an image.

11th Jun 2020, 5:05 AM
Shah Fahad
Shah Fahad - avatar
11 Answers
+ 1
To demo lib indicated by ꧁Sᴏᴜᴘᴛɪᴋ Nᴀᴛʜ꧂ Run from pc to save image file. https://code.sololearn.com/WBWk4iF6AING/?ref=app
11th Jun 2020, 8:08 AM
Calviղ
Calviղ - avatar
+ 3
https://github.com/tsayen/dom-to-image Hope This Helps.
11th Jun 2020, 5:21 AM
Souptik Nath
Souptik Nath - avatar
+ 3
Calviղ Dont know why but the image is faded from the original dom. What is blob?
11th Jun 2020, 8:19 AM
Souptik Nath
Souptik Nath - avatar
+ 2
꧁Sᴏᴜᴘᴛɪᴋ Nᴀᴛʜ꧂ blob is image data blocks for saving image.
11th Jun 2020, 8:21 AM
Calviղ
Calviղ - avatar
+ 1
JME Thanks but I want to know if there is any way in code.
11th Jun 2020, 5:19 AM
Shah Fahad
Shah Fahad - avatar
+ 1
Calviղ Thank You
11th Jun 2020, 8:25 AM
Shah Fahad
Shah Fahad - avatar
11th Jun 2020, 8:26 AM
Shah Fahad
Shah Fahad - avatar
0
take a screenshot
11th Jun 2020, 5:17 AM
JME
0
In google search dom to image
11th Jun 2020, 9:53 AM
Mohammad Ansari
Mohammad Ansari - avatar
0
hi so you cute
12th Jun 2020, 11:20 PM
Y/p
Y/p - avatar
- 1
Use this syntax, but use a different image name in src because I have used a random image name for example. <div> <img src="xyz.jpg" width=400 height=400 alt="my image" > </div>
11th Jun 2020, 5:20 AM
Omkar Kamat
Omkar Kamat - avatar