]> source.dussan.org Git - nextcloud-server.git/commit
feat(theming): Only convert a background image if it benefits from it
authorFerdinand Thiessen <rpm@fthiessen.de>
Wed, 1 Feb 2023 12:23:35 +0000 (13:23 +0100)
committerFerdinand Thiessen <rpm@fthiessen.de>
Mon, 20 Feb 2023 12:11:19 +0000 (13:11 +0100)
commit7e1152603f1a083566241527ef2a615104c91395
tree323e16faadc62280cbf8672d372ddc486acfa15e
parent95eeba83b6570b3cf7cbb79aea42222f7d3e03f4
feat(theming): Only convert a background image if it benefits from it

* WebP images are generally quite small, converting to pngs would increase
  the filesize a lot.
* Small JPEG and PNG images do not benefit from any conversion, so skip it.
* JPEG images will get quite bigger when converted to PNG so instead convert to progressive JPEG

Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
apps/theming/lib/ImageManager.php
apps/theming/tests/ImageManagerTest.php