The correct ImageMagick WASM API is: image.write(format, callback) Where the format is passed as the first argument and the callback receives the encoded data. This should produce valid WebP with correct RIFF headers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>