Closed erayusta closed 2 years ago
Hi @erayusta
I am not sure I understand your issue.
Just note that the resize
method doesn't define the size of the crop box, but the size to which the image will be resized during upload (keeping the ratio).
If you want to specify a ratio for the crop box, you can give the croppable
method a first parameter.
Hope this helps.
Thank you for response. I understood you correctly.
Actually, I want to custom size for the crop box.
Actually, I want to custom size for the crop box.
You can give it a ratio. The package uses https://github.com/fengyuanchen/cropperjs and cropperjs doesn't allow to pass an arbitrary width and height for the crop box.
I suggest you pass a ratio and define your ideal width or height in the resize
method. Like this, your final image will have the right size, and your user will still be able to decide which part of the image to crop in case she wants to shrink the selection for instance.
As an example, ->croppable(16/9)->resize(400)
will result in an image of 400px by 225px.
I want to resize and crop image from admin panel. But i think it's not working.
AdvancedImage::make('Image','image')->croppable()->resize(624, 168),
Then i selected 700x700 px image
Is it croppable/resize area size 624x168?