My Samsung has the option to save as HEIF. When I want to share that photo, my phone shares the HEIF file which isn’t commonly supported.
An iPhone also saves as HEIF - however, it automatically converts to jpeg when you share. Much smarter, more seamless.
https://www.collaboraoffice.com/nextcloud/ sounds like what you’re looking for. I’ve not tried it myself as I actually like the Google docs/sheets etc offering.