File tree Expand file tree Collapse file tree
user_guide_src/source/libraries Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,6 +89,19 @@ starting at the top left corner. The result would be saved as the thumbnail.
8989 while processing images you may need to limit their maximum size, and/or
9090 adjust PHP memory limits.
9191
92+ Image Quality
93+ =============
94+
95+ ``save() `` can take an additional parameter ``$quality `` to alter the resulting image
96+ quality. Values range from 0 to 100 with 90 being the framework default. This parameter
97+ only applies to JPEG images and will be ignored otherwise::
98+
99+ $image = Config\Services::image()
100+ ->withFile('/path/to/image/mypic.jpg')
101+ ->save('/path/to/image/my_low_quality_pic.jpg', 10);
102+
103+ .. note :: Higher quality will result in larger file sizes. See also https://www.php.net/manual/en/function.imagejpeg.php
104+
92105Processing Methods
93106==================
94107
You can’t perform that action at this time.
0 commit comments