1

My question may be simple:

Is there a way to save div content as an image(jpg) without additional libraries like "html2canvas" ?

Thank you in advance!

Eduard Climov
  • 165
  • 1
  • 15
  • 1
    asking questions that have answers like YES or NO are not for stackoverflow. anyway...with a minimal search on this site you could've found several answers. see here for example : http://stackoverflow.com/questions/17311645/download-image-with-javascript – Mihai T Aug 03 '16 at 09:21

2 Answers2

4

Simply put, no. There's no native way to capture an element as an image without some third-party script.

HTML2Canvas is also very robust and quite lightweight, apart from errors when handling SVG images!

Nick Bull
  • 9,518
  • 6
  • 36
  • 58
0

As far as I know, you can't do this without a library.

Anyway you can see several questions on StackOverflow dealing with this subject, if you want to avoid Canvas: 1, 2.

Community
  • 1
  • 1
Mistalis
  • 17,793
  • 13
  • 73
  • 97