BKWLD / croppa

Image thumbnail creation through specially formatted URLs for Laravel.
MIT License
492 stars 91 forks source link

Fix quality url parameter causing a type error #221

Closed toyi closed 3 months ago

toyi commented 3 months ago

This is a very tiny PR that fixes the following error when using "-quality(xx)" in the url (since this commit from intervention/image).

Intervention\Image\Encoders\JpegEncoder::__construct(): Argument #1 ($quality) must be of type int, 
string given, called in /var/www/html/vendor/intervention/image/src/Format.php on line 129

By typing the property to int, it ensures any string will be casted to an int ("90" becomes 90 and so on...).

I don't think it needs it's own test (at least not for this specific change), but feel free to ask if you think a dedicated test is necessary.

sdebacker commented 3 months ago

Thanks