base64 à PNG Nodejs

const fs = require("fs");
const buffer = Buffer.from(base64, "base64");
fs.writeFileSync("new-path.jpg", buffer);
MR. D