Synchronize Contact Photos/Pictures between Z-Push and Nextcloud



  • @Manfred, I do have some knowledge and I was looking into the code of the carddav backend but seems that my knowledge is not sufficient for that yet. I will look into it a little more on the weekend but I do not have the indepth knowledge that I would need to assist. Sorry. But I will try my best to be a helpfull tester :-)



  • I have also huge problems with the CardDAV Backend. In my case, the contact pictures are stored. But all images will be reduced to 96x96 pixels. In /etc/z-psh/z-push.conf.php i have the default

    define('SYNC_CONTACTS_MAXPICTURESIZE', 5242880);
    

    set. I haven’t found anything other. All images are JPEG files.


  • Kopano

    Hi Linseece,

    Is the source of your contacts also nextcloud?

    Where are the images reduced to that size? When you create a contact in nextcloud and sync to the mobile, they are 96x96 pixels on the mobile? Or vice versa?

    Please provide WBXML log for such a contact being synced.

    Manfred



  • I have tested a little bit more. If i use the standard Samsung Exchange Account and create a contact on the mobile, it saves the contact on the server with 395x395px. But if i change afterwards something on the contact with the contact app of the Samsung device, the contact picture size is reduced to 96x96px.

    Now i try the same with the app Nine. Maybe i get better results. It has its own sync engine and contact editor. In the past, i had better results with that app.



  • @Manfred in my case it’s not directly Nextcloud. I use SabreDAV as backend, but since NextCloud is based heavily on SabreDAV, i think, its nearby the same. After a long absence from Z-Push, this is my first retry after a long time. Maybe i miss something… SabreDAV is synced also to a Roundcube instance, since i have no idea, how get mails in Kopano directly from a external IMAP server (without using fetchmail or such things).



  • Ok another test:

    • Samsung Account deleted (to stop syncing and destroying results)
    • Created Account in App Nine
    • Created contact in Nine with picture size 350x350px
    • After sync, checked the server: The contact is saved there with picture size 350x350px
    • changed contact in Roundcube
    • the change is visible on the mobile
    • checked mobile: Picture is at 350x350px

    So it seems, that using Nine, at least for picture size, its more stable as this Samsung Apps. This was only a test with one Contact. I hope its the same with all the other contacts.

    As i have seen, using JPEG as picture format seems to be mandatory for using BackendCardDAV, since its hard-coded at at line 1303 in carddav.php. Not a big deal for me. I try batch convert my pictures before i use them.



  • If Windows 10 Mail Client is involved (DeviceType=WindowsMail MSFT-WIN-3/10.0.17763) and the contact is edited there, the contact picture is downsized also to 96x96px. Again ,if i use only the Android App Nine, all works as expected and the contact picture stays on a much bigger size.

    I don’t know, if there anything could be done in that case, since it seems to be a client issue. Maybe Windows Mail and Samsung build-in client interpret the card data in some unexpected way.

    For testing, i use now a dedicated copy of the sabredav database with a different url, do not mix the content. So if someone needs some special tests, he/she is welcome to ask.

    @Manfred: In the case you want a testbed at that server, you can send me a private message in english or german.


  • Kopano

    Hi Linseece,

    then probably Windows Mail rescales the image. Did you try to set a smaller image than 96x96px if it will be upscaled to that size when Windows Mail is involved?

    Manfred



  • I test that tomorrow. Since it’s possible to add CardDAV servers to Windows Mail via iCloud, i have done that today. If i add or change a contact via Windows Mail CardDAV Account, the is no down-scaling. So it seems, that this is a effect only for EAS Account types. Regarding upscaling, i report you my results tomorrow.



  • Im back :-)

    • Added the account as EAS Account in WindowsMail MSFT-WIN-3/10.0.17763

    • Changed a Contact (added a second name) where i have a big contact picture

    • Save that Contact

    • Checked online the Contact

    • Contact Picture is now at 112x112px, the changed name is also visible

    • Now changed another contact and added a picture with 52x52px, since smaller sizes are not allowed

    • Saved Contact

    • Checked Contact online

    • Contact picture is at 614x614px… wow, thats blurry and ugly

    If i try the same steps with a CardDAV Accout (iCloud), all infos/pictures stays intact



  • @Realshadow how you managed to sync contacts and calendar i cant do it.(((


Log in to reply