Changed from image.write((data) => data) callback pattern to image.write(outputFormatEnum) which correctly writes the image data in the specified format. This should now produce valid WebP files with proper RIFF headers (52 19 46 46 magic bytes). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>