immich icon indicating copy to clipboard operation
immich copied to clipboard

[Bug] Can't set profile picture

Open lukaslindnermusic opened this issue 9 months ago • 25 comments
trafficstars

The bug

I can't set a profile picture for my admin account (I only have one account at the moment). When I select an image and then click the option, the menu where I can resize & reposition the photo appears. But no matter how I position the photo and no matter what type of photo I choose, when trying to safe it, I get: Error: Profile pictures cannot have transparent pixels. Please zoom in and/or move the image.

However, I am fully zoomed in, and this also happens with photos that are squared aka. where there is no empty/transparent space around the photo in the first place.

This problem appears in Chrome as well as Safari.

(not sure if the problem is with the web version or with the server, so I checked both.)

The OS that Immich Server is running on

Synology DSM 7.2.2-72806 Update 2

Version of Immich Server

v1.125.7

Version of Immich Mobile App

1.125.3 build.191

Platform with the issue

  • [x] Server
  • [x] Web
  • [ ] Mobile

Your docker-compose.yml content

services:
  immich-redis:
    image: redis
    container_name: Immich-REDIS
    hostname: immich-redis
    security_opt:
      - no-new-privileges:true
    healthcheck:
      test: ["CMD-SHELL", "redis-cli ping || exit 1"]
    user: 1026:100
    environment:
      - TZ=Europe/Berlin
    volumes:
      - /volume1/Media/Media/Photos/immich/redis:/data:rw
    restart: on-failure:5

  immich-db:
    image: tensorchord/pgvecto-rs:pg16-v0.2.0
    container_name: Immich-DB
    hostname: immich-db
    security_opt:
      - no-new-privileges:true
    healthcheck:
      test: ["CMD", "pg_isready", "-q", "-d", "immich", "-U", "immichuser"]
      interval: 10s
      timeout: 5s
      retries: 5
    volumes:
      - /volume1/Media/Media/Photos/immich/db:/var/lib/postgresql/data:rw
    environment:
      - TZ=Europe/Berlin
      - POSTGRES_DB=immich
      - POSTGRES_USER=immichuser
      - POSTGRES_PASSWORD=******
    restart: on-failure:5

  immich-server:
    image: ghcr.io/immich-app/immich-server:release
    container_name: Immich-SERVER
    hostname: immich-server
    user: 1026:100
    security_opt:
      - no-new-privileges:true
    env_file:
      - stack.env
    ports:
      - 8212:2283
    volumes:
      - /volume1/Media/Media/Photos/immich/upload:/usr/src/app/upload:rw
    restart: on-failure:5
    depends_on:
      immich-redis:
        condition: service_healthy
      immich-db:
        condition: service_started

  immich-machine-learning:
    image: ghcr.io/immich-app/immich-machine-learning:release
    container_name: Immich-LEARNING
    hostname: immich-machine-learning
    user: 1026:100
    security_opt:
      - no-new-privileges:true
    env_file:
      - stack.env
    volumes:
      - /volume1/Media/Media/Photos/immich/upload:/usr/src/app/upload:rw
      - /volume1/Media/Media/Photos/immich/cache:/cache:rw
      - /volume1/Media/Media/Photos/immich/matplotlib:/matplotlib:rw
    environment:
      - MPLCONFIGDIR=/matplotlib
    restart: on-failure:5
    depends_on:
      immich-db:
        condition: service_started

Your .env content

DB_DATA_LOCATION=./postgres
IMMICH_VERSION=release
DB_PASSWORD=*******
DB_USERNAME=immichuser
DB_DATABASE_NAME=immich
DB_HOSTNAME=immich-db
REDIS_HOSTNAME=immich-redis
NODE_ENV=production
LOG_LEVEL=log
JWT_SECRET=*****
DISABLE_REVERSE_GEOCODING=false
REVERSE_GEOCODING_PRECISION=3
PUBLIC_LOGIN_PAGE_MESSAGE=
IMMICH_WEB_URL=http://immich-web:3000
IMMICH_SERVER_URL=http://immich-server:3001
IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003

Reproduction steps

  1. Choose a photo in the web version and click it
  2. Click on the three dots and choose "Set as profile picture"
  3. Zoom in so that the image fills the whole circle
  4. Click "Set as profile picture"
  5. The Error message appears

Relevant log output


Additional information

No response

lukaslindnermusic avatar Jan 31 '25 17:01 lukaslindnermusic

The issue appears to be in the hasTransparentPixels function in profile-image-cropper.svelte. It incorrectly returns true even for images without transparency, such as solid black images. The cause is unclear to me, but it may be related to how alpha channels are handled.

immangat avatar Jan 31 '25 21:01 immangat

I do have the same issue. No workaround for me. I tried make a picture square (1028*1028) make it fit natively in the frame, but no sucess that way.

TheIceMagmaCube avatar Feb 01 '25 22:02 TheIceMagmaCube

@TheIceMagmaCube @lukaslindnermusic what is extension of the image? Is it .jpg or something else?

immangat avatar Feb 02 '25 00:02 immangat

It was a .png file (basically a screenshot resized).

TheIceMagmaCube avatar Feb 02 '25 00:02 TheIceMagmaCube

@TheIceMagmaCube @lukaslindnermusic what is extension of the image? Is it .jpg or something else?

For me, it was a .jpg, but it also happens with .png.

lukaslindnermusic avatar Feb 02 '25 08:02 lukaslindnermusic

Getting the same with Sony RAW (.ARW) and .jpg. Happy to help debug

fflores97 avatar Feb 05 '25 06:02 fflores97

Have the same issue on a newly installed instanse. Same error on both .jpeg and .HEIC files. Tried in different browsers on computer (chrome and firefox) and on mobile (chrome, firefox and safari)

pierrebengtsson avatar Feb 05 '25 19:02 pierrebengtsson

Working on a fix. In the mean time, you guys can use the mobile app to change the profile pic.

immangat avatar Feb 06 '25 06:02 immangat

Appreciate it, thanks! Quick question: I can’t find a way to change the profile pic for a person in the mobile app though. I am using iOS.

pierrebengtsson avatar Feb 10 '25 20:02 pierrebengtsson

thanks, @immangat 😊

@pierrebengtsson you have to tap on the top right on your account, then left from your name and mail, you can change it.

lukaslindnermusic avatar Feb 10 '25 20:02 lukaslindnermusic

@lukaslindnermusic sorry, I wasn’t specific enough. I have this issue not only with the profile pic for the admin account, I have the same issue with the profile pictures in the ”people” section. Same error message and everything. I can’t find a way to change those profile pictures in the app.

Thanks!

pierrebengtsson avatar Feb 10 '25 21:02 pierrebengtsson

I'm on v1.128.0 and still have the same issue.

z0rrn avatar Mar 03 '25 16:03 z0rrn

@z0rrn Could you please provide some more information? What platform, what browsers, what type of picture, the extension, etc.?

immangat avatar Mar 04 '25 07:03 immangat

I'm using Safari and Chrome on MacOS everything on the newest version.

As in the video, the first one should fail because there are transparent pictures, but all other ones shouldn't. I'm especially confused by the last one because it fails, then I'm opening the Dev Console in Safari and then works correctly. I've seen this behavior now multiple times. Sometimes it works when you zoom in and out again.

The image is 'Blick_in_die_Schmiedtorstraße_in_Tübingen_vom_Parkhaus_König_aus.jpg' from the demo instance uploaded to my own one.

The same behavior is on Chrome.

https://github.com/user-attachments/assets/47dfa0f7-8f71-4aa9-b8a2-5c0ea24a65c5

z0rrn avatar Mar 04 '25 10:03 z0rrn

@z0rrn thank you for this. I will look into it end of this week.

immangat avatar Mar 05 '25 18:03 immangat

just the thread I was looking for.. not just me then ;)

backyardaussie avatar Mar 08 '25 07:03 backyardaussie

I am also still running into this issue on v1.130.3

thomasbrooks4 avatar Apr 01 '25 04:04 thomasbrooks4

@alextran1502 can this be reopened? I am unable to set any picture as a profile picture due to this.

thomasbrooks4 avatar Apr 02 '25 21:04 thomasbrooks4

@z0rrn

Hey! Sorry for the late reply — life happened 😅

I just tested this on the latest code using Chrome on Windows, and I was able to set the profile picture successfully — including with the same image (Blick_in_die_Schmiedtorstraße_in_Tübingen_vom_Parkhaus_König_aus.jpg) from the demo instance.

Could you give it another try and see if the issue still persists on your end? Let me know what you find!

immangat avatar Apr 17 '25 23:04 immangat

Hi I tested it on the latest version with different photos and the issue still persists for me.

kimdre avatar Apr 27 '25 16:04 kimdre

Issue still persists for me as well on 1.132.1

profucius avatar Apr 28 '25 13:04 profucius

Issue still persists as of v1.133.1

Anyone not getting this issue?

profucius avatar May 25 '25 14:05 profucius

I'm on v1.131.3 and can set the profile pic.

immangat avatar Jun 16 '25 01:06 immangat

@immangat the latest version is 1.134.0. Can you try again?

alextran1502 avatar Jun 16 '25 03:06 alextran1502

@immangat the latest version is 1.134.0. Can you try again?

Issue is still not fixed for me on 1.134.0

profucius avatar Jun 16 '25 13:06 profucius

I was unable to set my profile picture using a picture with transparent pixels on 1.134.0. I would click the button to use the image as profile picture, it would pop up the window to crop it and click ok, but the button did nothing. Exiting showed that it had not set my profile picture. If I did the same with a picture without transparency the window went away after clicking ok and it set my profile picture.

There should be an error message or some sort of indication to the user if the picture could not be set successfully, but there isn't

Cedric-Boucher avatar Jun 18 '25 02:06 Cedric-Boucher

Same process for me ^

Also, the error message does show, but it only displays after doing the above, then quickly exiting the current viewed photo back to the timeline, then you'll see the red error message at the top right. Odd bug in itself.

profucius avatar Jun 18 '25 12:06 profucius

@immangat If it helps, I'm on the latest version (v1.135.3) and it still happens. I use Firefox on macOS.

DavidePgr avatar Jul 14 '25 22:07 DavidePgr

I deleted my immich instance and re-deployed the docker image for version v1.135.3 . I was able to set my profile pic. 🙃

immangat avatar Jul 17 '25 02:07 immangat

I just did a fresh install with v1.137.3 and can't seem set a profile picture via the web ui.

Jukelyn avatar Aug 06 '25 03:08 Jukelyn