break;
case AccountManager::PROPERTY_AVATAR:
if ($image !== null) {
- $vCard->add('PHOTO', 'data:'.$image->mimeType().';base64,' . base64_encode($image->data()));
+ $vCard->add('PHOTO', $image->data(), ['ENCODING' => 'b', 'TYPE' => $image->mimeType()]);
}
break;
case AccountManager::PROPERTY_EMAIL:
[
'cloud' => 'foo@cloud.net',
'email' => 'foo@bar.net',
- 'photo' => 'data:image/jpeg;base64,MTIzNDU2Nzg5',
+ 'photo' => 'MTIzNDU2Nzg5',
],
null,
'foo@bar.net',
'cloud' => 'foo@cloud.net',
'email' => 'foo@bar.net',
'fn' => 'Dr. Foo Bar',
- 'photo' => 'data:image/jpeg;base64,MTIzNDU2Nzg5',
+ 'photo' => 'MTIzNDU2Nzg5',
],
"Dr. Foo Bar",
"foo@bar.net",
[
'cloud' => 'foo@cloud.net',
'fn' => 'Dr. Foo Bar',
- 'photo' => 'data:image/jpeg;base64,MTIzNDU2Nzg5',
+ 'photo' => 'MTIzNDU2Nzg5',
],
"Dr. Foo Bar",
null,
[
'cloud' => 'foo@cloud.net',
'fn' => 'Dr. Foo Bar',
- 'photo' => 'data:image/jpeg;base64,MTIzNDU2Nzg5',
+ 'photo' => 'MTIzNDU2Nzg5',
],
'Dr. Foo Bar',
'',