-
Notifications
You must be signed in to change notification settings - Fork 103
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
Image orientate doesn't work #355
Comments
This doesn't sound like an issue with this package, the intervention/image package is doing all of the manipulation. It is most likely either an issue with your image, your configuration or the Intervention/Image package itself. Intervention is reading the EXIF metadata from the image to infer the correct orientation. Make sure that you have the EXIF php extension installed, as indicated in the Intervention documentation. Make sure you aren't attempting to apply the manipulation on an image which has already been passed through an optimizer, as these will usually strip EXIF metadata. |
Hi Sean!
|
Ah, I see. I wasn't aware of that restriction in the Intervention package. Because we could be dealing with files that could be coming from any number of potential sources (file, network, memory, S3, etc.), it currently handles everything as streams or in-memory strings, depending on the context. Looking at the source code of intervention, it appears to be able to read from streams. Version 3 of the library appears to build a tmp stream if needed for reading EXIF data, perhaps that would fix your issue. |
How do I use the v3 Intervention with mediable now? |
Manipulate images during upload doesn't apply auto-orientation https://image.intervention.io/v2/api/orientate.
Example: upload images with portrait orientation and it will be flipped.
ImageManipulator::defineVariant( '200x200', ImageManipulation::make(function (Image $image, Media $originalMedia) { $image->orientate(); $image->fit(200, 200); })->outputWebpFormat() );
The text was updated successfully, but these errors were encountered: