Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create VCF file with "PHOTO" imported using URL linking to an image file

Tags:

vcf-vcard

I'm trying to create a .VCF file according to these specs (using version 3.0)

https://en.wikipedia.org/wiki/VCard#vCard_3.0

https://www.rfc-editor.org/rfc/rfc2426#section-3.1.4

It all works fine unless the PHOTO field.

If I try to set the PHOTO using an external image (using the URI value) there is no way to have my mac or android to import the image to the created contact.

PHOTO;VALUE=URI;TYPE=GIF:http://www.example.com/dir_photos/my_photo.gif

It works if I embed base64 code on the JPG file.

Thank you. Has anyone succeded?

like image 932
Jordi Avatar asked Nov 25 '18 17:11

Jordi


People also ask

What is the format of a vCard file?

A vCard is saved as a . vcf file, which is the Internet standard for sharing contact information. When you send a vCard, its . vcf file is sent with the message as an attachment.

How many contacts can be in a VCF file?

Total number of vCards: 50,000. Maximum size of a vCard: 256KB (photo + text) Maximum photo size for a vCard: 224KB.

What is virtual contact file?

vCard, also known as VCF (Virtual Contact File), is a file format standard for electronic business cards. vCards can be attached to e-mail messages, sent via Multimedia Messaging Service (MMS), on the World Wide Web, instant messaging, NFC or through QR code.


1 Answers

You need to include a base64 encoded image uri:

PHOTO;ENCODING=BASE64;TYPE=PNG:iVBORw0KG...
like image 68
Soheil Avatar answered Nov 05 '22 09:11

Soheil