Issue Description
Contact photos that are set through JMAP don’t show up in iOS Contacts (CardDAV). Photos set on the iPhone show up fine everywhere, including in the JMAP client.
I set the photo with a webmail client that writes the card via JMAP (ContactCard with a media entry, kind “photo”, uri “data:image/jpeg;base64,…”). When the same card is fetched over CardDAV as vCard 4.0, the comma in the data URI is escaped, so the URI is no longer valid and iOS drops the photo.
Expected Behavior
The PHOTO data URI should be written as is, without text escaping:
PHOTO;MEDIATYPE=image/jpeg:data:image/jpeg;base64,/9j/4AAQSk…
As far as I understand RFC 6350, comma escaping applies to text values, not URI values. The PHOTO example in section 6.2.4 has the comma unescaped: RFC 6350: vCard Format Specification | RFC Editor
Actual Behavior
vCard 4.0 (default):
VERSION:4.0
PHOTO;MEDIATYPE=image/jpeg;PROP-ID=photo:data:image/jpeg;base64,/9j/4AAQSk…
The comma after “base64” comes out as “,”. iOS shows no photo for the contact.
With “Accept: text/vcard; version=3.0” the same card is fine:
VERSION:3.0
PHOTO;MEDIATYPE=image/jpeg;PROP-ID=photo;ENCODING=b;TYPE=JPEG:/9j/4AAQSkZJR…
Reproduction Steps
- Create or update a contact via JMAP with a photo:
media: { “photo”: { “kind”: “photo”, “mediaType”: “image/jpeg”, “uri”: “data:image/jpeg;base64,” } } - Fetch the card over CardDAV without an Accept header (or as vCard 4.0).
- Look at the PHOTO line: the comma in the data URI is escaped as “,”.
- Sync the address book to an iPhone: the contact has no photo.
- For comparison, fetch the same card with “Accept: text/vcard; version=3.0”: the PHOTO line is correct.
- Setting the photo on the iPhone instead (uploaded as vCard 3 with ENCODING=b) works on both sides.
Stalwart Version
v0.16.x
Installation Method
Binary (Linux)
Database Backend
RocksDB
Blob Storage
RocksDB
Search Engine
Internal
Directory Backend
Internal
I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.
on
I have searched this support forum (open and closed topics) and confirm this is not a duplicate.
on
I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.
on