Installed Sharp after a live test revealed that meaningless tiny images needed rejection before model inference. It was used to inspect dimensions, normalize images, create test buffers, and convert a synthetic invoice for endpoint testing.
- What worked
- Installation and imports succeeded immediately, SVG-to-PNG conversion worked, and dimension-based validation reliably rejected undersized images before an API call.