"Image not found" when sharing public link via mail after update to 10.6.0
Steps to reproduce
- Upload a file
- Share it with a public link
- Enter a mail to share it with and send it
Expected behaviour
It should just send the mail without any error messages.
Actual behaviour
A error pops up "image not found: image:logo-mail_NAME.png webroot: serverroot:/var/www/vhosts/*****/httpdocs - see Screenshot:

Server configuration
Operating system: CentOS 6.10
Web server: Apache
Database: MySQL
PHP version: 7.2
ownCloud version: 10.6.0.5
Updated from an older ownCloud or fresh install: from older ownCloud
Where did you install ownCloud from: https://download.owncloud.org/community/owncloud-complete-20201216.tar.bz2
Signing status (ownCloud 9.0 and above): No errors have been found.
The content of config/config.php: https://privatebin.net/?37f88d77d4604164#EGx3tJXQC1M7VMamY6sr3jySbSAniNwTbAGCnJgfm7wx
password is "owncloud"
List of activated apps:
Enabled:
- ***: 1.0.0
- activity: 2.6.0
- comments: 0.3.0
- configreport: 0.2.0
- dav: 0.6.0
- external: 1.4.0
- federatedfilesharing: 0.5.0
- federation: 0.1.0
- files: 1.5.2
- files_antivirus: 0.15.2
- files_external: 0.7.1
- files_mediaviewer: 1.0.3
- files_pdfviewer: 0.11.2
- files_sharing: 0.14.0
- files_texteditor: 2.3.0
- files_trashbin: 0.9.1
- files_versions: 1.3.0
- firstrunwizard: 1.2.0
- gallery: 16.1.1
- impersonate: 0.5.0
- market: 0.6.0
- notifications: 0.5.2
- provisioning_api: 0.5.0
- systemtags: 0.3.0
- templateeditor: 0.4.0
- updatenotification: 0.2.1
Disabled:
- encryption
- user_external
Are you using external storage, if yes which one: no
Are you using encryption: no
Are you using an external user-backend, if yes which one: no
Client configuration
Browser: Chrome 87.0.4280.88
Operating system: Windows 10
Browser log
ocs/v1.php/apps/files_sharing/api/v1/notification/notify-public-link-by-email returns:
{"ocs":{"meta":{"status":"failure","statuscode":996,"message":"image not found: image:logo-mail_***.png webroot: serverroot:\/var\/www\/vhosts\/***\/httpdocs","totalitems":"","itemsperpage":""},"data":[]}}
We have a custom theme located in apps/ - which contains pictures for the mails in /apps/**/core/img. Before 10.6.0, sending mails worked without any error and it chose the correct picture. However, after upgrading to 10.6.0, the error appears and the default ownCloud image gets chosen. It tries to look into /core/img/ instead of /apps/***/core/img.
The way we get the picture in the template is this line:
<img src="<?php p(\OC::$server->getURLGenerator()->getAbsoluteURL(image_path('', 'logo-mail_***.png'))); ?>" alt="<?php p($theme->getName()); ?>"/>
@weber-ebusiness could be related https://github.com/owncloud/core/pull/38246