You can use the Download Validation step to perform advanced validations of image files such as type and dimensions.

Example code:

var dimensions = sizeOf(fileBuffer);
var {width, height, type} = dimensions;
console.log("Image dimensions", JSON.stringify(dimensions));

return width === parseInt(expectedWidth) &&
       height === parseInt(expectedHeight) &&
       type === expectedImageType &&

Parameters - Packages and JavaScript used in this example:

  1. name: sizeOf, type: Package, value: image-size@0.6.3
  2. name: expectedName, type: JavaScript, value: 'babybot'
  3. name: expectedImageType, type: JavaScript, value: 'jpg'
  4. name: expectedWidth, type: JavaScript, value: '260'
  5. name: expectedHeight, type: JavaScript, value: '260'

see screenshot:

Did this answer your question?