Project

General

Profile

Actions

Task #3433

open

Add options to change profile photo format

Added by David Štekl 8 months ago. Updated 7 months ago.

Status:
In Progress
Priority:
Normal
Assignee:
David Štekl
Target version:
Start date:
08/31/2023
Due date:
% Done:

80%

Estimated time:
Owner:

Description

If we send a profile photo to other systems, it is often necessary to follow the required format. For example, for the active directory (thumbnailPhoto attribute) it is usually around 100 KB.

The goal is to prepare a processor or script that will directly adjust the photo to the required size.

Actions #1

Updated by David Štekl 8 months ago

  • Status changed from New to Needs feedback
  • % Done changed from 0 to 80

I prepared and tested a processor that will adjust the inserted profile photo according to the configuration - ExtrasPhotoResizeProcessor.

I also created new Groovy scripts that are useful for working with profile photos. One script for sync photos from active directory to IdM and one for provisioning which also resizes photos.

More in documentation here: https://wiki.czechidm.com/devel/documentation/modules_extras/resize_profile_photo

Actions #2

Updated by David Štekl 8 months ago

  • Assignee changed from David Štekl to Ondřej Kopr
Actions #4

Updated by Peter Štrunc 7 months ago

  • Assignee changed from Ondřej Kopr to Peter Štrunc
Actions #5

Updated by Peter Štrunc 7 months ago

  • Status changed from Needs feedback to In Progress
  • Assignee changed from Peter Štrunc to David Štekl

I created PR for this task here: https://github.com/bcvsolutions/czechidm-extras/pull/108

It looks and works great. I have just a few minor things:

  • In checkAndResizeImage in ExtrasUtils I would check for the maxSizeKb limit before writing the image to disk and write only after it fits the criteria
  • Please create tests for this processor.
Actions

Also available in: Atom PDF