Dear Team,
Nextcloud 19
I am trying to make a script which deploy vm with pre-configured nextcloud.
I am stuck at changing the logo and backgroud image
I can change the logo and backgroud (and other stuff) from frontend.
But i want to do it via script.
It will also be okay to replace any existing file.
Please help i checked the admin manual but couldn’t find it.
I also didn’t found anything in database.
which will copy your new logo to the correct location and allow the www-data user to edit it.
If you open a browser at this point the logo won’t have changed. To get it to change you need to tick the cachebuster. You can see the current cachebuster value with:
I came exactly to the same solution like you describe here. But I think you missed the setting of the corresponding mimetype - like
sudo -u www-data php occ config:app:set theming logoMime --value=“image/jpeg”
or something like that. I didn’t try it without, so I don’t know if it is really necessary
I found out another thing about it. At least the background image is cached in the Nextcloud-Filecache, and if you don’t flush the cache, it might happen that you only load half the picture (if the new one is double sized for example) and this results in loading error… My solution for it, after changing any of the pictures (logo, logoheader, background or favicon):
docker exec nextcloud_db_1 /usr/bin/mysql -h127.0.0.1 -Dnextcloud -unextcloud -pMYPASSWORD --execute “DELETE FROM filecache where path LIKE “appdata_%/theming/images/filename”;”
filename must be replaced with logo, logoheader, background or favicon
and now, everything works like a charm - i can change all of the 4 images programatically without useing the Nextcloud-UI