Conversation
|
Hi @sprabowo Full disclosure: I am merely an enthusiast here and these are my opinions and suggestions. I hope this review helps:
Lastly, it seems your initial commit included a |
|
Thank for the feedback @stedman, i've done the following task:
please check |
|
Nice! Sorry by the time I made it here there are a few more conflicts! |
|
I think I’m also confused about where the |
|
Hi @zachleat through this docs api resize do we need to add 'crop_position' opt for this library? |
Maybe await Image(src, {
crops: ['160x90'],
formats: ['jpeg'],
sharpResizeOptions: {
fit: sharp.fit.cover,
position: sharp.strategy.attention
}
}); |
|
Hi @zachleat any ideas to this crop feature? should I go ahead close this? |
|
Please don’t close—the time frame for this one might be long but it is still valuable 🙌🏻 I consider conflict resolution to be my responsibility here, don’t worry about keeping it up to date |
|
For future visitors, this can be achieved in v6.0.0 with a low level hook for sharp transformations #52 |

Hi @zachleat or @stedman
i just make a PR for adding mime type for jpg. All .jpg format don't return source type "image/jpeg". also add crop feature by adding heights config. i see the sharp api not only can resize with same ratio but also can crop the image https://sharp.pixelplumbing.com/api-resize#resize. with the crop feature, dev can easily crop with their on configuration for some use case e.g og:image, twitter:image
please help to review,
thanks