WhiskeySockets / Baileys

Lightweight full-featured typescript/javascript WhatsApp Web API
https://baileys.whiskeysockets.io/
MIT License
4.02k stars 1.36k forks source link

[BUG] cannot process image with extension HEIC/HEIF #606

Closed dimaslanjaka closed 9 months ago

dimaslanjaka commented 9 months ago

Describe the bug throw when sending image with HEIC/HEIF extension image

To Reproduce

you can download the sample photos https://drive.google.com/drive/folders/10_81O4E_amy1cKpyX-vP56EjHtLxmTif?usp=sharing

Expected behavior successful send reply message with png, jpg, webp, heif, heic extension.

Environment (please complete the following information):

Additional context

tb-sumberjaya commented 9 months ago

Basically WhatsApp doesn't support that codec. Even if you successfully send it, the client will not be able to display it because the codec is not supported. There are several alternatives:

  1. Send that file as document instead of as image
  2. Re-encode that file to another supported codec like jpeg, png, etc.