Skip to content

Allow cropping outside the image boundary

Allow users to crop outside the image boundary, with a white background used to fill the extra space.

// Allow unconstrained crop with white background fill.
gform.addFilter('image_hopper_filepond_config', function(config, FilePond, $form, currentPage, formId, fieldId, entryId, files, inputField) {
  config.imageEditor.editorOptions.imageCropLimitToImage = false
  config.imageEditor.editorOptions.imageBackgroundColor = [255, 255, 255]
  return config
}, 20 )