4

I'm trying to create a vCard containing the text below:

BEGIN:VCARD
VERSION:3.0
PHOTO;VALUE=uri:https://upload.wikimedia.org/wikipedia/commons/2/25/Intel_logo_%282006-2020%29.jpg
N:Raven;Test;;;
END:VCARD

according to this documentation ( screenshot of the part I'm talking about ) I tried base64 and it's working fine ( Contact app loads the image ) but in the URI situation it's not working ( Contact app does not load the image ), To avoid making a large file, my goal is to have a url in my vCard.vcf file not a base64, I'm stuck understanding what's wrong with my vCard.

basically what I'm trying to make is a vCard containing a photo that gets fetched by the url given and shows the photo in contact app of whatever OS the user will open it on (Windows/Android/IOS/macOS). I'm not using base64 because it makes my vCard file so big.

Nimzy
  • 41
  • 1
  • 3
  • 1
    When you say it's "not working", what do you mean exactly? Are you testing it in a particular calendar application? – IMSoP Sep 19 '21 at 20:03
  • 1
    @IMSoP save that block of code as a .vcf file, according to the documentation it basically should fetch the image from https://upload.wikimedia.org/wikipedia/commons/2/25/Intel_logo_%282006-2020%29.jpg and put it as the contact's photo. but it doesn't. that's the problem – Nimzy Sep 20 '21 at 17:52
  • 1
    What is "it" in the phrase "it basically should fetch the image"? I could save that content and open it in Notepad, and obviously that wouldn't download any images. So presumably you are testing whether the image displays *in some particular program* - even if it's just the preview function in Windows or MacOS. (And apologies for my brainfart in the previous comment; obviously, the relevant program would be a _contact manager_, not a _calendar_.) – IMSoP Sep 20 '21 at 18:00
  • 1
    @IMSoP "Save the block of code as a .vcf (vCard) file" but I forgot to say open it! it ( the file ) should usually pop the contact manager app on any OS You're right I forgot to say that none of Windows/Android/IOS/macOS contact managers will fetch the photo from the url. so it's probably something wrong with my vCard file basically what I'm trying to make is a vCard containing a photo that gets fetched by the url given and shows the photo in contact app of Windows/Android/IOS/macOS Operating Systems. I'm not using base64 because it makes my vCard file so big. – Nimzy Sep 20 '21 at 20:36
  • 1
    It looks like this has previously been asked (but not yet answered) here: https://stackoverflow.com/questions/53469857/create-vcf-file-with-photo-imported-using-url-linking-to-an-image-file?rq=1 It's possible that although the standard specifies this way of referencing an image, not many programs actually support it. – IMSoP Sep 20 '21 at 21:09
  • 1
    It looks like contact images in general are pretty poorly supported. Exporting from Thunderbird doesn't seem to include any photos at all. Exporting from GMail includes a property of "PHOTO:https://lh5.googleusercontent.com/-dWoMW-hfjI8/YUj6559lxfI/AAAAAAAAAAA/OISCkUGy10ocDiMvqHoM55fln9sWVSBCgCOQCEAE/photo.jpg" rather than a base64 blob, but even importing back to GMail doesn't load this image. – IMSoP Sep 20 '21 at 21:31
  • 1
    @IMSoP Yes I've tried google contacts as well, Tried importing it back to android and IOS yet no luck. I've also tried exporting a contact from phone, It exports the file with base64 inside. This really bothers me because it's an important feature of a big application and I'm not able to solve this :( – Nimzy Sep 21 '21 at 16:26
  • I am trying to do the same but still no luck. seems impossible! – PouJa Jul 28 '22 at 23:45

2 Answers2

5

External urls are probably blocked by most programs, same as loading external images are blocked. It's a massive privacy concern.

someguy
  • 69
  • 1
  • 7
0

Maybe hosting it on a service like Google Cloud would help, in that you can edit the CONTENT-TYPE and CACHE meta data attributes? It’s my novice understanding that smartphone OS is particularly wary of “unknown” file properties - probably for good reason.

Bill
  • 1