Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Support for contact photos using vCard PHOTO properties? #14

@todd-a-jacobs

Description

@todd-a-jacobs

While this may or may not require dropping the error correction setting, it seems like contact photos should be supportable. Right now, the contact always imports without a contact photo and there's no way to add one in the builder.

vCard supports encoding the contact image as base64, and that's how Apple normally does it, but that often exceed the character limits of a QR code without structured append. However, there are two possible options:

  1. Using the PHOTO field defined by vCard 4.0, which supports both base64 encoding and a URL scheme. Wikipedia says vCard supports the following PHOTO properties:

    2.1: PHOTO;JPEG:http://example.com/photo.jpg
    2.1: PHOTO;JPEG;ENCODING=BASE64:[base64-data]
    3.0: PHOTO;TYPE=JPEG;VALUE=URI:http://example.com/photo.jpg
    3.0: PHOTO;TYPE=JPEG;ENCODING=b:[base64-data]
    4.0: PHOTO;MEDIATYPE=image/jpeg:http://example.com/photo.jpg
    4.0: PHOTO;ENCODING=BASE64;TYPE=JPEG:[base64-data]

  2. Using the contact photo as an overlay on the QR code.

    This is less desirable if you want to use the company logo for the overlay, but at least it's an option of a more suitable vCard field can't be used.

My personal preference would be to support PHOTO;MEDIATYPE=image/jpeg:http://example.com/photo.jpg or PHOTO;TYPE=JPEG;VALUE=URI:http://example.com/photo.jpg if they're compatible with iOS devices and/or Apple Contacts. Is that a potential feature enhancement that could be considered?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions