Skip to content

Commit a2e67a6

Browse files
author
RevisionTen
authored
Added missing quality parameter to webp method
This parameter is needed to control the quality of the WebP image in the webp twig image function. Example with 50% quality: ```Twig {{ web_image(image).webp(50) }} ```
1 parent 68b4edd commit a2e67a6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Image.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -573,11 +573,11 @@ public function png()
573573
}
574574

575575
/**
576-
* Generates and output a png cached file.
576+
* Generates and output a webp cached file.
577577
*/
578-
public function webp()
578+
public function webp($quality = 80)
579579
{
580-
return $this->cacheFile('webp');
580+
return $this->cacheFile('webp', $quality);
581581
}
582582

583583
/**

0 commit comments

Comments
 (0)