Description
Hi,
thanks for the great service!
I'm wondering if I'm doing anything wrong, but it seems to me that cropping and resizing the cropped result is not supported. Is this so by design and do you need to do this in two steps (by sending the cropped result again to a new weserv call for resizing)?
Please look at the following examples:
-
Cropped area from a hires image:
https://images.weserv.nl/?url=https://poetsbureau-dev-images.s3.eu-central-1.amazonaws.com/jjoxtAAS_anna-ogiienko-382635-unsplash.jpg&crop=1235,1235,1861,348 -
trying to resize the same cropped area into a 200x200 square
https://images.weserv.nl/?url=https://poetsbureau-dev-images.s3.eu-central-1.amazonaws.com/jjoxtAAS_anna-ogiienko-382635-unsplash.jpg&crop=1235,1235,1861,348&w=200&h=200&t=fit -
this gives the same result as when leaving out the crop parameter:
https://images.weserv.nl/?url=https://poetsbureau-dev-images.s3.eu-central-1.amazonaws.com/jjoxtAAS_anna-ogiienko-382635-unsplash.jpg&w=200&h=200&t=fit -
doing it with another queryParam sequence (crop after resize params), results in cropping after resizing:
https://images.weserv.nl/?url=https://poetsbureau-dev-images.s3.eu-central-1.amazonaws.com/jjoxtAAS_anna-ogiienko-382635-unsplash.jpg&w=200&h=200&t=fit&dpr=2&crop=2783,2783,348,348
For me this is weird, because:
- queryparam order shouldn't influence the result
- transformations should always be relative to original image
- crop parameter is skipped in (2), not respecting the specification/documentation
Thanks for your feedback!