Class: CustomizeImageCropper

wp.media.controller. CustomizeImageCropper


new CustomizeImageCropper()

A state for cropping an image in the customizer.
Since:
  • 4.3.0
Source:

Extends

  • wp.media.controller.CustomizeImageCropper.Cropper

Methods


doCrop(attachment)

Posts the crop details to the admin. Uses crop measurements when flexible in both directions. Constrains flexible side based on image ratio and size of the fixed side.
Parameters:
Name Type Description
attachment Object The attachment to crop.
Since:
  • 4.3.0
Source:
Returns:
A jQuery promise that represents the crop image request.
Type
$.promise