sveltekit-example-html-to-image

Sveltekit Example Html To Image

Test package html-to-image within SvelteKit.

sveltekit-example-html-to-image

In this example I test html-to-image for client-side image generation. Choose size and pixel ratio and then press Render as PNG to replace the blue div with an image.

If you run the example on a retina display and choose pixel ratio 1 the image will look blurry. Choose a higher pixel ratio and the image will look crisp.

Tasks

  • Add button to download image.
  • Test if html-to-image can be run in an endpoint (with jsdom or happy-dom).

Top categories

svelte logo

Want a Svelte site built?

Hire a Svelte developer
Loading Svelte Themes