Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply Custom cropping parameters to Photon as well #13

Open
jeherve opened this issue Aug 16, 2015 · 1 comment
Open

Apply Custom cropping parameters to Photon as well #13

jeherve opened this issue Aug 16, 2015 · 1 comment

Comments

@jeherve
Copy link

jeherve commented Aug 16, 2015

Jetpack's Photon module is a free image CDN that downloads a copy of each original image uploaded to a site, and creates resized versions on the fly for every use of the image on the site.

Here is a list of the different resize and crop parameters accepted by Photon:
https://developer.wordpress.com/docs/photon/

By default, it doesn't actually crop anything, it only resizes:
https://developer.wordpress.com/docs/photon/api/#resize

I was wondering if it were possible to extend your plugin to take Photon into account, and generate a list of Photon parameters based on the calculations you make in crop(), I believe:
https://github.com/interconnectit/my-eyes-are-up-here/blob/master/face-detect.php#L306

Here is a quick example of how to apply custom crop parameters to a image with Photon:
http://jetpack.me/2013/07/17/use-photon-to-serve-post-thumbnails-with-custom/

This was originally suggested by a user here:
https://wordpress.org/support/topic/photon-ignores-cropping-location?replies=1&view=all

@Warpsmith
Copy link

No luck with this so far?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants