Closed michaseel closed 3 years ago
The main problem will be to find a simple API to use the complex extract feature.
I like the how the imgix api adds more features to the crop
option like: entropy, face-recoginition, focal-point, zoom etc.
https://docs.imgix.com/apis/url/size/crop
A more general discussion would be to change the api to completely use url-query's instead of mixed params and query´s
Without params its easier to convert your options to a query-string:
import queryString from 'query-string';
cosnt src = queryString.stringify({
url,
quality,
width,
height,
crop,
...
});
For certain use-cases the sharp "extract" option is pretty handy. http://sharp.dimens.io/en/stable/api-operation/#extract