A feature-rich fork of wa-sticker-formatter for creating and formatting WhatsApp stickers. Supports static images, GIFs, videos (animated WebP), and SVG input. Provides a fluent class-based API (Sticker) and a functional createSticker() function. Includes metadata extraction, custom backgrounds, sticker types (Default, Crop, Full, Circle, Rounded), and Baileys-MD compatibility. Version 0.0.2, actively maintained with TypeScript types included.
npm install stickers-formatterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a WhatsApp sticker from a local image, applies full type, white background, and emoji categories, then saves as WebP.
Upgrade to Node 14+ or use wa-sticker-formatter (v1.x) for older Node versions.
Replace 'default' with StickerTypes.DEFAULT, 'crop' with StickerTypes.CROP, etc.
Run `npm install sharp` in addition to stickers-formatter.
Install libwebp (e.g., `apt install libwebp` on Debian; `brew install webp` on macOS).
Use `sock.sendMessage(jid, await sticker.toMessage())` to actually send via Baileys.
Ensure input is a Buffer, file path, or URL string. Check for undefined/null before constructing.
npm install sharp
Use `import { Sticker } from 'stickers-formatter'` or upgrade to CJS-compatible version.Install libwebp package (see README for OS-specific commands).
Use enum-like StickerTypes.DEFAULT, StickerTypes.CROP, etc., or lowercase string 'default', 'crop', 'full', 'circle', 'rounded'.
Check that the image source exists and is a valid image format (PNG, JPEG, GIF, WebP, SVG).