const sharp = require('sharp');
If you need to fail based on image properties (e.g., "fail if image is smaller than 100px"), you must access the metadata first. sharp failon option
: As noted in the Directus Documentation, image transformations are memory-intensive. On systems with limited resources (1GB RAM or less), allowing "heavy" or corrupted images to continue processing can lead to memory overflows and server crashes. const sharp = require('sharp'); If you need to