{"id":42010,"library":"stickers-formatter","title":"stickers-formatter","description":"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.","status":"active","version":"0.0.2","language":"javascript","source_language":"en","source_url":"https://github.com/GlobalTechInfo/stickers-formatter","tags":["javascript","whatsapp","wa-sticker-formatter","stickers","stickers-formatter","whatsapp-stickers","webp","libwebp","typescript"],"install":[{"cmd":"npm install stickers-formatter","lang":"bash","label":"npm"},{"cmd":"yarn add stickers-formatter","lang":"bash","label":"yarn"},{"cmd":"pnpm add stickers-formatter","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Image processing (resize, crop, format conversion)","package":"sharp","optional":false},{"reason":"WebP encoding for sticker output","package":"libwebp","optional":true},{"reason":"HTTP requests for fetching remote images","package":"axios","optional":true}],"imports":[{"note":"ESM import is recommended. CommonJS require works but breaks tree-shaking.","wrong":"const Sticker = require('stickers-formatter').Sticker","symbol":"Sticker","correct":"import { Sticker } from 'stickers-formatter'"},{"note":"Must be a named import, not default.","wrong":"import createSticker from 'stickers-formatter'","symbol":"createSticker","correct":"import { createSticker } from 'stickers-formatter'"},{"note":"Enum-like object with values: DEFAULT, CROP, FULL, CIRCLE, ROUNDED.","wrong":"","symbol":"StickerTypes","correct":"import { StickerTypes } from 'stickers-formatter'"},{"note":"TypeScript only; use type import for runtime efficiency.","wrong":"import { IStickerOptions } from 'stickers-formatter'","symbol":"IStickerOptions","correct":"import type { IStickerOptions } from 'stickers-formatter'"}],"quickstart":{"code":"import { Sticker, StickerTypes } from 'stickers-formatter';\nimport { writeFile } from 'fs/promises';\n\nasync function createSticker() {\n  const sticker = new Sticker('./image.png', {\n    pack: 'My Sticker Pack',\n    author: 'Me',\n    type: StickerTypes.FULL,\n    quality: 80,\n    background: '#ffffff',\n    categories: ['😀', '🎉']\n  });\n  const buffer = await sticker.toBuffer();\n  await writeFile('sticker.webp', buffer);\n  console.log('Sticker created!');\n}\n\ncreateSticker().catch(console.error);","lang":"typescript","description":"Creates a WhatsApp sticker from a local image, applies full type, white background, and emoji categories, then saves as WebP."},"warnings":[{"fix":"Upgrade to Node 14+ or use wa-sticker-formatter (v1.x) for older Node versions.","message":"Version 0.0.2 removed support for Node < 14","severity":"breaking","affected_versions":">=0.0.2"},{"fix":"Replace 'default' with StickerTypes.DEFAULT, 'crop' with StickerTypes.CROP, etc.","message":"The `StickerTypes` string literals are deprecated; use enum-like values instead","severity":"deprecated","affected_versions":">=0.0.2"},{"fix":"Run `npm install sharp` in addition to stickers-formatter.","message":"Sharp must be installed separately for image processing; not a direct dependency","severity":"gotcha","affected_versions":">=0.0.2"},{"fix":"Install libwebp (e.g., `apt install libwebp` on Debian; `brew install webp` on macOS).","message":"Animated WebP output requires the `libwebp` binary installed on system PATH","severity":"gotcha","affected_versions":">=0.0.2"},{"fix":"Use `sock.sendMessage(jid, await sticker.toMessage())` to actually send via Baileys.","message":"`Sticker.toMessage()` returns a baileys-compatible object but does NOT send the message; only formats it","severity":"gotcha","affected_versions":">=0.0.2"},{"fix":"Ensure input is a Buffer, file path, or URL string. Check for undefined/null before constructing.","message":"The constructor now throws if `image` argument is not a valid Buffer, string, or URL","severity":"breaking","affected_versions":">=0.0.2"}],"env_vars":null,"search_vec":"'0.0.2':61 'activ':62 'anim':25 'api':36 'background':47 'bailey':57 'baileys-md':56 'base':35 'circl':53 'class':34 'class-bas':33 'compat':59 'creat':15 'createstick':41 'crop':51 'custom':46 'default':50 'extract':45 'featur':6 'feature-rich':5 'fluent':32 'fork':8 'format':17 'formatt':3,13,73,77 'full':52 'function':40,42 'gif':23 'imag':22 'includ':43,67 'input':29 'javascript':68 'libwebp':82 'maintain':63 'md':58 'metadata':44 'provid':30 'rich':7 'round':54 'static':21 'sticker':2,12,19,37,48,72,74,76,80 'stickers-formatt':1,75 'support':20 'svg':28 'type':49,66 'typescript':65,83 'version':60 'video':24 'wa':11,71 'wa-sticker-formatt':10,70 'webp':26,81 'whatsapp':18,69,79 'whatsapp-stick':78","created_at":"2026-06-04T18:55:10.930745+00:00","updated_at":"2026-06-04T18:55:10.930745+00:00","problems":[{"fix":"npm install sharp","cause":"Sharp is a peer dependency and must be installed separately.","error":"Error: Cannot find module 'sharp'"},{"fix":"Use `import { Sticker } from 'stickers-formatter'` or upgrade to CJS-compatible version.","cause":"Using CommonJS require on ESM-only version or wrong import.","error":"TypeError: sticker.toBuffer is not a function"},{"fix":"Install libwebp package (see README for OS-specific commands).","cause":"libwebp binaries not installed on system.","error":"UnhandledPromiseRejection: Error: spawn libwebp_mux ENOENT"},{"fix":"Use enum-like StickerTypes.DEFAULT, StickerTypes.CROP, etc., or lowercase string 'default', 'crop', 'full', 'circle', 'rounded'.","cause":"Passing a string that is not one of the allowed StickerTypes values.","error":"TypeError: Invalid or unsupported sticker type: XYZ"},{"fix":"Check that the image source exists and is a valid image format (PNG, JPEG, GIF, WebP, SVG).","cause":"Buffer is empty or file path does not exist / is not an image.","error":"Error: Input image is empty or invalid"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/GlobalTechInfo/stickers-formatter#readme","github":"https://github.com/GlobalTechInfo/stickers-formatter","docs":null,"changelog":null,"pypi":null,"npm":"stickers-formatter","openapi_spec":null,"status_page":null,"smithery":null,"categories":["messaging"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}