How to generate a JPG image from html

Hi,

I would like to render an image from a html information, in order to share it later via SocialSharing.

How can I create a JPG image? is there any cordova plugin or javascript ionic compatible library?

Thanks in advance.

Hi

Did you check screenshot plugin?

Just a hunch

Rgds

Tom

thanks @Tommertom, screenshot is not an option, we would like to render an exact layout and not depending on user device screen.

any idea?

Html to jpg javascript

Hi. Were you able to do it? I need to implement a similar feature

Hi @rivendil, I didn’t do it yet, I found this ,maybe it is usefull for you:

Let us know if you use it in Ionic 3.

Thanks!

Ok so it works pretty well with Ionic 3. On some pages I couldn’t make it work though. Sometimes the base64 encoded image generated by the library doesn´t render properly img tags. I suppose you have to try it by yourself and see if It works for your particular usecase.

Oh and I also had an issue with some icons and the detail-push on ion-item

thanks for your feedback, we will try to implement this library in the future. Best regards.

Thank you. But issue is that it will not work on Safari in PWA (Progressive web app).

Hi @jose_inesta
Did you implement a lib for this feature?
Currently I need to render exact components to Image on Ionic Angular.
Pls share the library link if you built.
Regards