Adding Photo to vCard
Asked Answered
I

2

7

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.

Ireful answered 19/9, 2021 at 20:0 Comment(8)
When you say it's "not working", what do you mean exactly? Are you testing it in a particular calendar application?Crowbar
@Crowbar save that block of code as a .vcf file, according to the documentation it basically should fetch the image from upload.wikimedia.org/wikipedia/commons/2/25/… and put it as the contact's photo. but it doesn't. that's the problemIreful
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.)Crowbar
@Crowbar "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.Ireful
It looks like this has previously been asked (but not yet answered) here: #53470357 It's possible that although the standard specifies this way of referencing an image, not many programs actually support it.Crowbar
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:lh5.googleusercontent.com/-dWoMW-hfjI8/YUj6559lxfI/AAAAAAAAAAA/…" rather than a base64 blob, but even importing back to GMail doesn't load this image.Crowbar
@Crowbar 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 :(Ireful
I am trying to do the same but still no luck. seems impossible!Luciolucita
U
5

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

Univalent answered 1/2, 2022 at 13:35 Comment(0)
D
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.

Dust answered 19/7, 2022 at 2:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.