Comments (3)
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.
from nova-advanced-image-field.
Thank you for response. I understood you correctly.
Actually, I want to custom size for the crop box.
from nova-advanced-image-field.
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.
from nova-advanced-image-field.
Related Issues (20)
- Laravel Nova: Encoding format (tmp) is not supported. HOT 1
- Upload not working on server running Windows (`Encoding format (tmp) is not supported.`) HOT 10
- A default cropable area HOT 1
- AdvancedImage fields not replicated
- Webp HOT 2
- Croppable undermining dimension rules
- Question: can i pass in base64 encoded data HOT 1
- Support for `intervention/image:^3.0` HOT 1
- Is there a way to turn off the zoom / size change in cropping? HOT 2
- Looking to make images that are cached bustable, use a query string HOT 2
- Is there a method to have multipul images per record? HOT 2
- Anyone working on a Nova 4 upgrade? HOT 7
- Can we add watermark? HOT 1
- s3 disk() function compatibility HOT 1
- JS errors HOT 2
- Encoding format (tmp) is not supported. HOT 2
- Nothing showing in nova HOT 1
- Argument 2 passed to Ctessier\NovaAdvancedImageField\AdvancedImage::transformImage() must be an object HOT 1
- Doesn't work on a hosting HOT 4
- File change doesn't work anymore from Nova v4.22.0 HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nova-advanced-image-field.