Repository navigation
Labels
Description
⚠️ This issue respects the following points: ⚠️
- This is not a troubleshooting question, general support matter, or webserver/proxy problem, but likely a bug (if unsure, ask the Community Help Forum).
- This issue is not already reported on Github OR solved at the Community Help Forum (I've searched!).
- I'm using a maintained major version of Nextcloud Server and tested against the latest patch level. (Supported major versions and current patch levels).
- I agree to follow Nextcloud's Code of Conduct.
- I've tried my best to provide clear reproduction steps that someone unfamiliar with this bug could use to reproduce it.
Bug description
F-33 · An uploaded SVG favicon is served as application/octet-stream, the web app manifest icon fails
| Repository | nextcloud/server |
| Severity | Low (PWA install and home screen icons broken, console error on every page) |
| Component | apps/theming/lib/Controller/IconController.php (getTouchIcon(), getFavicon()), ThemingController::getManifest() |
| Affects | 35.0.1 (production instance with an SVG favicon uploaded in Theming) |
| Verified | Chrome DevTools on a production instance; unit tests |
What happens
Chrome logs on every page:
Error while trying to use the following icon from the Manifest:
https://<host>/apps/theming/icon/files?v=29 (Download error or resource isn't a valid image)
The response of /apps/theming/icon/files is 200 with Content-Type: application/octet-stream.
Cause
The uploaded original is stored in app data without an extension (images/favicon). Its filecache
MIME type is therefore application/octet-stream. ThemingController::getImage() already handles
this and sends the MIME type stored at upload time (faviconMime), with a comment that explains it.
IconController does not:
getTouchIcon()sends$iconFile->getMimeType(), which isapplication/octet-streamfor the
original. It also asks for the image with$useSvg = true, so it never gets the PNG rendering of
an SVG favicon, even when Imagick can produce one.getFavicon()sendsimage/x-iconfor any uploaded favicon, also for SVG and PNG uploads.- The manifest declares the touch icon as
image/png,512x512, and the favicon as
image/svg+xml,16x16. With an uploaded SVG favicon and no SVG support in Imagick, both URLs
return the SVG.
Browsers do not sniff SVG, so an SVG sent as application/octet-stream is rejected.
Steps to reproduce
Steps to reproduce
- Theming → upload an SVG as favicon. Imagick without SVG support (the default
nextcloud:fpmimage) shows it best. - Open any page with DevTools → Console, or open
/apps/theming/icon/coreand check theContent-Type.
Expected behavior
Fix
getTouchIcon()asks for the PNG rendering (getImage('favicon', false)), likegetFavicon().- Both send the stored MIME type for the original and
getMimeType()for converted files, the same
rule asThemingController::getImage(). Fallbacks:image/pngandimage/x-icon. - The manifest declares
image/svg+xmlwithsizes: anywhen an SVG favicon is served as SVG, and
the real type of an uploaded raster favicon. - Tests for an SVG original in both actions and for the manifest;
openapi.jsonregenerated
(getFaviconcan now return other image types).
Nextcloud Server version
35
Operating system
None
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response
Reacted by Benjamin Orgis
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsIn progress
Activity
susnux commentedon Dec 3, 2026
Confirmed on current master; a fix is proposed in #66822.