Skip to content

fix(web): avoid transparent pixels from rounded-full during profile picture capture#25950

Merged
alextran1502 merged 1 commit intoimmich-app:mainfrom
adityaidev:fix/profile-picture-transparent-pixels
Feb 6, 2026
Merged

fix(web): avoid transparent pixels from rounded-full during profile picture capture#25950
alextran1502 merged 1 commit intoimmich-app:mainfrom
adityaidev:fix/profile-picture-transparent-pixels

Conversation

@adityaidev
Copy link
Contributor

Summary

Follow-up fix for #25892 — addresses the transparent pixels error reported by @michelheusschen.

Problem

The cropContainer element has the rounded-full Tailwind class, which makes it circular. When domtoimage.toBlob() captures the container, the resulting image is a square where the corners outside the circle are transparent. This triggers the existing hasTransparentPixels check, showing the error:

Profile pictures cannot have transparent pixels. Please zoom in and/or move the image.

Solution

Pass a style override to domtoimage.toBlob() to temporarily set borderRadius: '0' and border: 'none' during capture. This produces a clean square image without transparent corners, while the visual display remains circular (CSS is unaffected).

Changes

  • Added style: { borderRadius: '0', border: 'none' } to the domtoimage.toBlob() options

Testing

  • Set profile picture from any image → No more transparent pixels error
  • Image is captured as a clean 1:1 square
  • Visual circular crop preview is unchanged

…icture capture

The cropContainer has rounded-full class which creates transparent
corners when captured by domtoimage.toBlob(). Override border-radius
and border to 0/none during capture to produce a clean square image.
@alextran1502 alextran1502 enabled auto-merge (squash) February 6, 2026 03:21
@alextran1502 alextran1502 merged commit 999ce34 into immich-app:main Feb 6, 2026
54 of 56 checks passed
kiloomar pushed a commit to kiloomar/immich that referenced this pull request Feb 13, 2026
…icture capture (immich-app#25950)

The cropContainer has rounded-full class which creates transparent
corners when captured by domtoimage.toBlob(). Override border-radius
and border to 0/none during capture to produce a clean square image.

Co-authored-by: Aditya Gaurav <aditya-ai-architect@users.noreply.github.com>
kiloomar pushed a commit to kiloomar/immich that referenced this pull request Feb 17, 2026
…icture capture (immich-app#25950)

The cropContainer has rounded-full class which creates transparent
corners when captured by domtoimage.toBlob(). Override border-radius
and border to 0/none during capture to produce a clean square image.

Co-authored-by: Aditya Gaurav <aditya-ai-architect@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants