diff --git a/src/Api/Encoder.php b/src/Api/Encoder.php index bef473b..4d42a1f 100644 --- a/src/Api/Encoder.php +++ b/src/Api/Encoder.php @@ -135,7 +135,7 @@ public static function supportedFormats(): array */ public function getQuality(): int { - $default = 90; + $default = 85; $q = $this->getParam('q'); if ( diff --git a/tests/Api/EncoderTest.php b/tests/Api/EncoderTest.php index b3bae46..3def110 100644 --- a/tests/Api/EncoderTest.php +++ b/tests/Api/EncoderTest.php @@ -151,11 +151,11 @@ public function testGetQuality(): void { $this->assertSame(100, $this->encoder->setParams(['q' => '100'])->getQuality()); $this->assertSame(100, $this->encoder->setParams(['q' => 100])->getQuality()); - $this->assertSame(90, $this->encoder->setParams(['q' => null])->getQuality()); - $this->assertSame(90, $this->encoder->setParams(['q' => 'a'])->getQuality()); + $this->assertSame(85, $this->encoder->setParams(['q' => null])->getQuality()); + $this->assertSame(85, $this->encoder->setParams(['q' => 'a'])->getQuality()); $this->assertSame(50, $this->encoder->setParams(['q' => '50.50'])->getQuality()); - $this->assertSame(90, $this->encoder->setParams(['q' => '-1'])->getQuality()); - $this->assertSame(90, $this->encoder->setParams(['q' => '101'])->getQuality()); + $this->assertSame(85, $this->encoder->setParams(['q' => '-1'])->getQuality()); + $this->assertSame(85, $this->encoder->setParams(['q' => '101'])->getQuality()); } /**