Change download format of card image from PNG to WEBP for improved quality and file size
This commit is contained in:
parent
7d7cd1bb46
commit
983325a2e2
1 changed files with 2 additions and 2 deletions
|
@ -186,8 +186,8 @@ function wrapText(text, x, y, maxWidth, lineHeight) {
|
||||||
// Download button
|
// Download button
|
||||||
downloadBtn.addEventListener("click", () => {
|
downloadBtn.addEventListener("click", () => {
|
||||||
const link = document.createElement("a");
|
const link = document.createElement("a");
|
||||||
link.download = "kemoverse-card.png";
|
link.download = "kemoverse-card.webp";
|
||||||
link.href = canvas.toDataURL("image/png");
|
link.href = canvas.toDataURL("image/webp");
|
||||||
link.click();
|
link.click();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Reference in a new issue