JS
a (quick example)
var i = new Image(), t = "PIZZA!", c = document.createElement("canvas"), ctx = canvas.getContext("2d");
i.onload = () => { SOURCE IMAGE c.width = i.naturalWidth; c.height = i.naturalHeight; ctx.drawImage(i, 0, 0, i.naturalWidth, i.naturalHeight); ADD TEXT ctx.font = "bold 50px Arial"; ctx.fillStyle = "rgb(255, 255, 255)"; ctx.fillText(t, 0, 50); };
GO! i.src = "IMAGE.JPG";
CREATE <A> LINK let a = document.createElement("a"); a.href = c.toDataURL("image/webp"); a.download = "download.webp";
DOWNLOAD & REMOVE LINK a.click(); a.remove();