contacts icon indicating copy to clipboard operation
contacts copied to clipboard

Contact photo "PHOTO;ENCODING=B:" is not shown

Open waclaw66 opened this issue 3 years ago • 4 comments

Describe the bug

Photo of following contact is not shown in NextCloud... 7346f7260c9cab20.zip

Google, Thunderbird and Roundcube show it correctly.

Steps to reproduce

  1. Import attached vcf file.
  2. View contact
  3. No photo shown, just obrazek

Expected behavior

Contact photo shall be shown.

Actual behavior

No contact photo shown.

Contact version

4.2.2

Operating system

Fedora 36

PHP engine version

PHP 8.1

Web server

Nginx

Database

MariaDB

Additional info

No response

waclaw66 avatar Oct 18 '22 13:10 waclaw66

At first I thought that I experience the same issue. To verify, I exported two contacts that both have a PHOTO with ENCODING=B:… and imported those in another Nextcloud. In the first NC, only one of them (a JPEG) was shown, the WEBP wasn't. But in the other NC, both photos were shown. So, it seams that this is rather a "new imagemagick version" and/or "NC image caching" issue. Anyway, I deleted the contact where the photo wasn't shown, and re-importing it from the export (without any modification) did the trick for me. Shown fine now. Also note that both contact photos were shown in Thunderbird CardBook, even without the export-delete-re-import. (Contacts 5.0.2, Nextcloud 25.0.2, Arch Linux)

So, yes, there's an issue (with cached images), but there's a workaround, too. That should work for bulk export/import aswell.

nursoda avatar Jan 08 '23 17:01 nursoda

I don't think it's a caching problem, there is no <img> element inserted in avatar block...

<div data-v-4c5a24b3="" class="app-content-list-item-icon"><div data-v-9183f516="" data-v-4c5a24b3="" aria-label="Avatar of Home" class="avatardiv popovermenu-wrapper avatardiv--unknown" style="--size: 40px; line-height: 40px; font-size: 22px;"><!----> <!----> <!----> <div data-v-9183f516="" class="avatardiv__initials-wrapper" style="background-color: rgba(188, 92, 145, 0.1);"><div data-v-9183f516="" class="unknown" style="color: rgb(188, 92, 145);">
			H
		</div></div></div></div>

There is more likely a problem with vCARD photo parser, that vCARD file comes from Google Contacts that I have in sync with NextCloud. The problem persists on NextCloud 25.0.2 and Contacts 5.0.2.

waclaw66 avatar Jan 09 '23 10:01 waclaw66

Hmmm. Unsure. Thing is: I just wanted to write that I agree since the webp profile photos of newly created contacts weren't shown. After doing something different and switching back to the browser, there I suddenly saw the photos (that initially only were initials). I probably clicked on another contact and back.

At first, I thought it might by that conversion to a different file format (probably would need imagemagick being installed) could be the reason, but right-clicking and saving the profile photo reveals that it's still the binary identical WEBP file (Header: RIFF|WEBPVP8L).

So, for my NC25 instance, it just took a while until it was displayed. Dunno why though.

nursoda avatar Mar 14 '23 12:03 nursoda

I have a similar issue to @waclaw66 reported description. When I add a photo to a Nextcloud Contact in Thunderbird, then the photo is visible in Thunderbird but not in Nextcloud using Firefox (v. 122.0 (64-bit))

pat-githubber avatar Feb 04 '24 11:02 pat-githubber