-
Notifications
You must be signed in to change notification settings - Fork 201
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
Encode using media type instead of extension #410
Conversation
Fixes animated webp (image/x-webp)
@@ -58,17 +58,11 @@ public function getImageManager(): ImageManager | |||
/** | |||
* Set the manipulators. | |||
* | |||
* @param ManipulatorInterface[] $manipulators Collection of manipulators. | |||
* @param array $manipulators Collection of manipulators. | |||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*/ | |
* @throws \InvalidArgumentException | |
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ADmad good catch, I added the missing phpdoc
src/Api/Api.php
Outdated
* @param ImageManager $imageManager Intervention image manager. | ||
* @param array $manipulators Collection of manipulators. | ||
* @param ImageManager $imageManager Intervention image manager. | ||
* @param list<ManipulatorInterface|null> $manipulators Collection of manipulators. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think |null
is necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed, its been fixed
Something went wrong, testsuite is failing. |
GitHub is having some issues, I can't restart the workflow, tests are all green locally:
I'll try to fix as soon as I can |
@ADmad it seems |
Aha, I remember now, |
@ADmad all green now, let me know if there's anything you want me to update |
Looks good to go. I'll just have a look again with fresh eyes tomorrow before merging. |
@deluxetom I re-thought about the problem your PR aims to address and come up with an alternative which require much lesser code changes #415 |
Closing as the alternative PR is merged. Thank you @deluxetom. |
If an image had
image/x-webp
or another format supported byIntervention
but not defined insupportedFormats
, it would fail.This uses
encodeByMediaType
instead which uses the proper values and available formats defined byIntervention