Validate images and videos based on their width and height values. Use with ImageBitmapTransform to automatically optimise valid images before upload.

The MediaResolutionValidator extension can be configured with the MediaResolutionValidatorOptions object.

import { defineFilePond } from 'filepond';
import { locale } from 'filepond/locales/en-gb.js';
import { MediaResolutionValidator } from 'filepond/extensions/media-resolution-validator.js';

defineFilePond({
    locale,
    extensions: [
        // Add the MediaResolutionValidator extension and configure with MediaResolutionValidatorOptions object
        [MediaResolutionValidator, {
            // Media must have a resolution of at least 1024 × 768 pixels
            minWidth: 1024,
            minHeight: 768
        }]
    ]
})