Comments (14)
Released 6.1.0 which will attempt to automatically pick a driver while still allowing it to be configured using intervention/image-laravel.
from laravel-mediable.
I have the same issue, Laravel 11 and PHP 8.3.
from laravel-mediable.
Hi there, so this isn't a bug with the package, it's just that Laravel doesn't know which driver to use when building Intervention image class without you telling it. It isn't really up to this package to pick for you, as you may have other code using the library already in place.
Adding the following to a service provider would be sufficient:
// for GD
$app->bind(Intervention\Image\Interfaces\DriverInterface::class, \Intervention\Image\Drivers\Gd\Driver::class);
// or for Imagick
$app->bind(Intervention\Image\Interfaces\DriverInterface::class, \Intervention\Image\Drivers\Imagick\Driver::class);
Preferably, you can use the intervention/image-laravel package to configure intervention/image, then Mediable will be able to load it from the container already set up.
I'm sure that others will run into similar issues, so I will add a note about this to the documentation. Thank you for bringing it to my attention
from laravel-mediable.
It works fine on Plank Mediable 5 and also on Image Intervention version 2.
We shouldn't need to make all these changes to get it to work.
from laravel-mediable.
That is a change in the intervention/image package, not this one. Version 2 of intervention/image would automatically assume the use of GD as a driver, if no other was specified. Version 3 no longer makes that assumption, and requires a driver to be explicitly provided.
You are welcome to pin your application's composer.json to use "intervention/image": "^2.0"
if you prefer that one. This package is compatible with both.
from laravel-mediable.
I am using Imagick with v2 and somehow it works.
Are you able to put that in your composer requirements?
So everyone doesn't have to run through this same issue?
from laravel-mediable.
Some manual configuration was always necessary to use imagick:
- Do you have a config/image.php file configuring which driver to use, such as the one described in this documentation? Previously the provider was built into the intervention/image package. With V3 this provider is extracted out into the
intervention/image-laravel
extension. - The docs of the this package suggested an alternative from prior to that provider being available (this needs to be updated for V3)
I don't think it make sense to require it (manual installation steps necessary), but I will add the intervention/image-laravel
to the composer "suggest" list to provide the reminder. I will also update the docs accordingly with V3 instructions.
from laravel-mediable.
I actually was unaware that Plank was using GD by default or why it is even used in the first place?
I do use Imagick post processing to crop, compress, and scale the image. I know Plank doesn't do this.
from laravel-mediable.
Tagged 6.0.2 with composer suggest and new documentation
from laravel-mediable.
plank/mediable uses intervention/image as it is available in the Laravel service container, it doesn't configure that 3rd party package for you. If you were previously doing no configuration, then you were using GD which was previously the default of that package.
Yes, the GD extension is capable of cropping and resizing images.
from laravel-mediable.
I get that GD is capable of cropping and resizing, but what is Plank using it for?
I am looking into the configuration/package you suggested.
Also, I didn't see anywhere in the Plank documentation about any of this either.
from laravel-mediable.
Installing that package throws a new error
Illuminate\Container\EntryNotFoundException
Intervention\Image\ImageManager
The app bind suggestion also doesn't work on Laravel 11, and v3 removes Laravel support without the laravel package.
from laravel-mediable.
OMG, thank you! I ran the composer update and it finally installed successfully and ran the package:discover script.
from laravel-mediable.
glad it worked! Apologies for the back and forth on this. There was a bit of a chicken and egg situation in the bootstrapping order that I wasn't aware of
from laravel-mediable.
Related Issues (20)
- Documentation is not clear how to use the package HOT 4
- SourceAdapter\UploadedFileAdapter bad mime_type from client HOT 2
- PHPStan - Add template to MediableCollection HOT 3
- How to build filament component as plank does not exposes any interface like HasMedia HOT 3
- Move media to root directory HOT 2
- File gets renamed upon upload? HOT 1
- Call to undefined method Plank\Mediable\ImageManipulation::toPngFormat() HOT 4
- Files are not removed from disk on deleting the variants HOT 3
- The Chinese file name is automatically changed to pinyin,I want a Chinese name HOT 2
- Import changes visility on original file HOT 4
- Support `intervention/image` ^3.0 HOT 10
- Upload Media on AWS S3 private Bucket HOT 4
- detach relations does not work on delete HOT 1
- base64 uploading HOT 5
- Add Support for Laravel 11.0
- Change Facade HOT 1
- New migration is not published when using the provider. HOT 4
- URL Attribute issue with Private Buckets HOT 2
- Can not upgrade to new version, I've read all upgrade guides HOT 16
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 laravel-mediable.