Media Validator Reference
This reference was automatically generated from code on 2025-01-24
ImageOrientationValidator
Validator that checks the orientation (square, portrait, landscape) of a given image.
Supported validator options are (array)allowedOrientations with one or two out of ‘square’, ‘landcape’ or ‘portrait’.
Example:
[at]Flow\Validate("$image", type="\Neos\Media\Validator\ImageOrientationValidator",
options={ "allowedOrientations"={"square", "landscape"} })
this would refuse an image that is in portrait orientation, but allow landscape and square ones.
The given $value is valid if it is an NeosMediaDomainModelImageInterface of the configured orientation (square, portrait and/or landscape) Note: a value of NULL or empty string (‘’) is considered valid
Note
A value of NULL or an empty string (‘’) is considered valid
Arguments
allowedOrientations
(array): Array of image orientations, one or two out of ‘square’, ‘landcape’ or ‘portrait’
ImageSizeValidator
Validator that checks size (resolution) of a given image
Example: [at]FlowValidate(“$image”, type=”NeosMediaValidatorImageSizeValidator”, options={ “minimumWidth”=150, “maximumResolution”=60000 })
The given $value is valid if it is an NeosMediaDomainModelImageInterface of the configured resolution Note: a value of NULL or empty string (‘’) is considered valid
Note
A value of NULL or an empty string (‘’) is considered valid
Arguments
minimumWidth
(integer, optional): The minimum width of the imageminimumHeight
(integer, optional): The minimum height of the imagemaximumWidth
(integer, optional): The maximum width of the imagemaximumHeight
(integer, optional): The maximum height of the imageminimumResolution
(integer, optional): The minimum resolution of the imagemaximumResolution
(integer, optional): The maximum resolution of the image
ImageTypeValidator
Validator that checks the type of a given image
Example: [at]FlowValidate(“$image”, type=”NeosMediaValidatorImageTypeValidator”, options={ “allowedTypes”={“jpeg”, “png”} })
The given $value is valid if it is an NeosMediaDomainModelImageInterface of the configured type (one of the image/* IANA media subtypes)
Note: a value of NULL or empty string (‘’) is considered valid
Note
A value of NULL or an empty string (‘’) is considered valid
Arguments
allowedTypes
(array): Allowed image types (using image/* IANA media subtypes)