-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Added new method for intervention WebP support #108
Conversation
Hi @Ruitjes Thank you for your contribution! If the need is to be able to convert the output image to WebP, it could totally be another format as well. What do you think? AdvancedImage::make('Photo')->convert('webp');
public function convert($format)
{
$this->outputFormat = $format;
return $this;
}
if ($this->outputFormat) {
$this->image->encode($this->outputFormat);
} See https://image.intervention.io/v2/api/encode for the available formats. |
Thanks for your quick response @ctessier! I totally agree with your comment, thus I have made the needed changes to support all the encoding formats by Intervention. Please have a look again :). |
@ctessier Don't want to come across as impatient, but I was wondering if you could review my pull request sometime :) |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Hi @Ruitjes I am merging after a few adjustments. Thank you so much for your contribution! |
Hi @ctessier
Hope you can find the time to check my PR and hopefully approve it.
I hope I've implemented it the right way, if not please let me know so I can change it accordingly. Tested it locally worked as intended.
Its currently only limited to use
webp
and not for all the other possibly encodings see.Fixes #106.