aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2022-11-17 08:41:34 +0100
committerGitHub <noreply@github.com>2022-11-17 08:41:34 +0100
commitf021172eab79b6e1adaa1950009dd6446f1ddb64 (patch)
tree4e43a87db7a0a58e62ed9978f7a535d5787ccd1a
parentd0f9eab6473d35f82a4583a21a4ccc4ae8ff3a0d (diff)
parentd27a39271e39d043caff3fe4d8538748ca22b18d (diff)
downloadnextcloud-server-f021172eab79b6e1adaa1950009dd6446f1ddb64.tar.gz
nextcloud-server-f021172eab79b6e1adaa1950009dd6446f1ddb64.zip
Merge pull request #35203 from nextcloud/jpeg-80
Default Jpeg quality to 80
-rw-r--r--lib/private/legacy/OC_Image.php2
-rw-r--r--tests/lib/ImageTest.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/legacy/OC_Image.php b/lib/private/legacy/OC_Image.php
index 45584b7209a..b48d13c4d5b 100644
--- a/lib/private/legacy/OC_Image.php
+++ b/lib/private/legacy/OC_Image.php
@@ -415,7 +415,7 @@ class OC_Image implements \OCP\IImage {
* @return int|null
*/
protected function getJpegQuality() {
- $quality = $this->config->getAppValue('preview', 'jpeg_quality', 90);
+ $quality = $this->config->getAppValue('preview', 'jpeg_quality', '80');
if ($quality !== null) {
$quality = min(100, max(10, (int) $quality));
}
diff --git a/tests/lib/ImageTest.php b/tests/lib/ImageTest.php
index c843d5f5eb9..ace3f1abcec 100644
--- a/tests/lib/ImageTest.php
+++ b/tests/lib/ImageTest.php
@@ -140,7 +140,7 @@ class ImageTest extends \Test\TestCase {
$config = $this->createMock(IConfig::class);
$config->expects($this->once())
->method('getAppValue')
- ->with('preview', 'jpeg_quality', 90)
+ ->with('preview', 'jpeg_quality', '80')
->willReturn(null);
$config->expects($this->once())
->method('getSystemValueInt')