Automatically orient, crop, resize, and compress images. Use with MediaResolutionValidator to filter out and optimise unwanted images before upload.

The ImageBitmapTransform extension can be configured with the ImageBitmapTransformOptions object.

import { defineFilePond } from 'filepond';
import { locale } from 'filepond/locales/en-gb.js';
import { ImageBitmapTransform } from 'filepond/extensions/image-bitmap-transform.js';

defineFilePond({
    locale,
    extensions: [
        // Add the ImageBitmapTransform extension and configure with ImageBitmapTransformOptions object
        [ImageBitmapTransform, {
            // Resize all images to fit a 512 by 512 bounding box
            width: 512,
            height: 512,

            // Images should be contained in the above bounding box
            fit: 'contain',

            // Crop all images to a square
            aspectRatio: 1
        }]
    ]
})