Closed aidilaryanto closed 3 years ago
WhatsApp by default, or at least via Web-WhatsApp will always convert pngs and svg to a raster (jpg ?) . You lose all transparency. I am forced in my dayjob, to first zip up any png/svg. So thus, i am almost certain you cannot send PNG while preserving transparency. Its unfortunate, but its an issue of WhatsApp itself.
Thanks for the details @kmirea
@aidilaryanto If transparency is important then I suggest sending it as a sticker. Otherwise send it using:
https://docs.openwa.dev/classes/client.html#sendfile
with withoutPreview
param as true
.
Closing for now.
Thanks
or you can do it by using
const bufferBase64 = `data:application/x-zip-compressed;base64,${ yourBase64Img }`;
await client.sendFile(from, bufferBase64, 'foto-nobg.png', 'fotonya tuan' ,false, false, false, true);
by adding withoutPreview
params as true
and add extension file name as .png
in fileName
param
Is able to send transparent image with format png?