Support for focal point (crop/background position)
First off, thanks for this library, it seems extremely useful!
When generating images to be used as a background image (Cover Block, etc) there are 2 requirements in order to use this library:
-
Allow different aspect ratios at different window sizes (pretty sure this already works).
-
Allow a focal point so different sizes are cropped in the correct location.
Since the block editor now has and uses this https://developer.wordpress.org/block-editor/components/focal-point-picker/ It would be super useful to be able to pass the focal point (in relation to the original image) and have the additional image sizes use this focal point when generating new images.
Maybe there is a better solution, but either way it would be great to insure the focal point is always centered on all the images.
Looking into WP_Image_Editor class, it seems like crop() method handles this pretty well. Maybe this could be integrated here.