-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
feat: crop feature #10
base: main
Are you sure you want to change the base?
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 |
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