Theming app does not allow *.ico file types for favicon
Nextcloud version: 15.0.8
Results in a 'Unsupported image type' message. PNG works fine.
Index: apps/theming/lib/Controller/ThemingController.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- apps/theming/lib/Controller/ThemingController.php (revision 452d7696ff7e663f1794742d9708bb62a2771097)
+++ apps/theming/lib/Controller/ThemingController.php (date 1560625529000)
@@ -326,7 +326,7 @@
* @return array
*/
private function getSupportedUploadImageFormats(string $key): array {
- $supportedFormats = ['image/jpeg', 'image/png', 'image/gif',];
+ $supportedFormats = ['image/jpeg', 'image/png', 'image/gif', 'image/x-icon'];
if ($key !== 'favicon' || $this->imageManager->shouldReplaceIcons() === true) {
$supportedFormats[] = 'image/svg+xml';
Does this work?
Does this work?
It does work.
Currently, it makes it so all the image choices can be .ico files. Does it make sense to allow the login image, header logo, etc. to be set with .ico files?
Do you think it would make sense to add this instead?
if ($key === 'favicon') {
$supportedFormats[] = 'image/x-icon';
}
Do you think it would make sense to add this instead?
Yes :+1: Mind to create a pr with these changes?
Yes +1 Mind to create a pr with these changes?
Sure thing. Thank you.
Does it make sense to allow the login image, header logo, etc. to be set with
.icofiles?
No, it doesn't. *.ico files are designed for the favicon only, not regular image files.