nuhel / filament-cropper Goto Github PK
View Code? Open in Web Editor NEWFilement Cropper Js
License: MIT License
Filement Cropper Js
License: MIT License
after composer require nuhel/filament-cropper show Class "App\Filament\Resources\Cropper" not found
I see you have circle, square, etc. How would I go about setting an oval or have that option to do so?
If we create a cropper instance with only jpg and png images allowed and upload a file with a wrong extension, we get an error message with incorrect filetypes.
For example if we configute the cropper with ->acceptedFileTypes(['image/png', 'image/jpeg']);
we get following error message: "Erwartet image/png, image/gif oder image/jpeg".
This is wrong, because we don't allow the upload of gif-Images.
How can we change the error message?
When I apply ->enabledAspectRatios([
'2:3', '9:16', '5:5'
])
to cropper it errors out saying
Error when trying to use this package with Laravel 8:
Method Illuminate\Support\Arr::join does not exist. (View: /var/www/html/vendor/nuhel/filament-cropper/resources/views/components/cropper.blade.php)
The error is correct, but the composer.json
file is not. The Arr::join()
is only available from Laravel 9. The composer.json
dependencies need to reflect this. Or if this package is supposed to be compatible with Laravel 8, then replacing Arr::join()
with implode()
is needed.
I'm guessing it's this line:
accept="{{\Illuminate\Support\Arr::join($getAcceptedFileTypes(),',','')}}"
(This feels wrong anyway - why is the joiner for the last two file types in the list an empty string? It would mean they possibly wouldn't work.)
At least, being in a view, this can be easily to publish and override as a workaround. Works great after doing that.
Your requirements could not be resolved to an installable set of packages.
Problem 1
- nuhel/filament-cropper[dev-main, 1.0.0, ..., 1.1.2] require filament/filament ^2.0 -> found filament/filament[v2.0.0-beta1, ..., 2.x-dev] but it conflicts with your root composer.json require (3.0).
- Root composer.json requires nuhel/filament-cropper * -> satisfiable by nuhel/filament-cropper[dev-main, 1.0.0, ..., 1.1.2, 9999999-dev].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require nuhel/filament-cropper:*" to figure out if any version is installable, or "composer require nuhel/filament-cropper:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Installed and it works fine on the root resource, but inside of a form repeater the modal wont load. I get to select the image file, and nothing happens after that. Also tried this with FilamentCroppie and got the same behaviour.
Please support Filament v3
Hi there,
Is this compatible with the Media Library first-party components?
https://filamentphp.com/docs/2.x/spatie-laravel-media-library-plugin/installation
When opening an image that is portrait (more height than width), the modal window of cropper exceeds the (portrait) screen heigth and it becomes very difficult to use the cropper.
In the example below, more than half of the modal is off screen.
Is there a setting to limit the modal height to screen height?
Using:
laravel 10.9.0
filament 2.17.29
filament-cropper 1.1.2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.