Person photos are shown in multiple places:
- In the user menu in the top-right
- In the burger bar on the left
- In the context header for a person
- In people search results
- On the Org Chart
- On direct report and other people listings
Uploading and deleting photos
You can control who can update and delete photos for whom. For example, you might:
- Allow employees to update or delete their own photo (the default)
- Allow super users to update or delete anyone's photo
- Prevent anyone from updating or deleting photos because images are interface into Oracle from an external data source
Update and delete permissions are controlled by the delivered permissions (functions) Applaud EmployeeCenter Upload Photo Permission (XXAS_EMP_UPL_PHOTO_PERM) and Applaud EmployeeCenter Delete Photo Permission (XXAS_EMP_DEL_PHOTO_PERM) respectively. Both of these permissions use the Applaud HR Person object, which means you can control update and delete access at the row level.
Both of these permissions are included in a Permission Set (menu) called Applaud EmployeeCenter ESS Photo Permission Set (XXAS_EMP_PHOTO_PSET). This Permission Set is granted to the Applaud Employee Self Service Role with access restricted to editing or deleting the photo for only the person who is the same person as the logged-on person. This grant is called Applaud Grant Edit Photo to Employees.
If you wish to retain this access but grant additional access to select individuals or roles:
- Go to Functional Administrator: Security: Grants
- Create a new grant:
- The Object must be Applaud HR Person.
- The Permission Set should be a copy of Applaud EmployeeCenter ESS Photo Permission Set (XXAS_EMP_PHOTO_PSET), eg, XXX EmployeeCenter Photo Permission Set
- Specify the Grantee as per your requirements
- Choose the Instance Set as per your requirements, or use All Rows to allow the editing/deleting for all people
If you wish to revoke the default access:
- Go to Functional Administrator: Security: Grants
- Find the grant Applaud Grant Edit Photo to Employee. You'll need to change the Grantee Type to Group of Users for the search to work.
- Update this grant, enter an end date in the past and save it.
You can only update person photos from certain locations, such as in the context header. For performance reasons, you cannot update photos in the search results and in most other people's listings.
Restricting the maximum photo size
The app uses the Oracle standard profile option Upload File Size Limit (UPLOAD_FILE_SIZE_LIMIT) to control the maximum upload size of a person's photo.
12.2 and above users: if you find that the photo upload is failing for images much smaller than this profile option's setting, it may be that WebLogic is restricting this at the Application Server level. To change this, ask your Database Administrator to:
- Copy the file $FND_TOP/admin/template/security2_conf_FMW.tmp to
$FND_TOP/admin/template/custom directory
(do not override if it's already present)
- Add below line after module <IfModule security2_module>
SecRequestBodyNoFilesLimit <value in bytes>
Note: <value in bytes> should be set to 50% larger than the Upload File Size Limit profile option, which allows for a larger base64 encoded file during transfer. That is:
<value in bytes> = Upload File Size Limit * 1500 (50% larger + conversion from KB to bytes)
- Run AutoConfig
- Restart the Application Tier Services
Supported file types
The following types of images are allowed:
- image/jpeg
- image/jpg
Performance considerations
Photos are optimized to use minimal resources on the database, application servers, network, and user devices. This is achieved using various strategies:
- When a photo is uploaded through the app, it automatically generates a series of thumbnails of the photo in the xxas_per_thumbnails table
- When a photo is uploaded through Oracle, a database trigger (xxas_per_images_ariud) runs on per_images which automatically generates the same thumbnails in the xxas_per_thumbnails table
- When a user views a photo, it retrieves the thumbnail size that is suitable for its placement. For example, small avatar images will use the smallest thumbnail; larger images will use larger thumbnails
- The expiry headers are set for a maximum of 12 months on each photo. That means browsers and devices will cache the photo for up to 12 months, resulting in no further network, application, or database server overhead
- When a photo is updated, devices and browsers will automatically retrieve the new updated photo even before 12 months is out
Force-generating thumbnails
Thumbnails may not have been generated for some or all people in certain situations, such as when the trigger has been inadvertently disabled. You can take the below steps to force generate thumbnails for all people.
1. Run this force generate script
DECLARE
CURSOR csr_all_images
IS
SELECT *
FROM per_images img
WHERE img.table_name = 'PER_PEOPLE_F';
TYPE l_images_t IS TABLE OF csr_all_images%ROWTYPE;
l_images_tbl l_images_t;
l_COMMIT_CYCLE CONSTANT NUMBER := 100;
l_commit_count NUMBER := 0;
l_errbuf VARCHAR2(400);
l_retcode NUMBER;
BEGIN
/* Bulk collect into a PL/SQL table so that regular commits can be
issued without commiting across fetch. */
OPEN csr_all_images;
FETCH csr_all_images BULK COLLECT INTO l_images_tbl;
CLOSE csr_all_images;
IF l_images_tbl.COUNT > 0 THEN
--
-- Loop through all person images
--
FOR i IN l_images_tbl.FIRST..l_images_tbl.LAST LOOP
xxas_per_image_pkg.copy_image_to_thum
(ERRBUF => l_errbuf
,RETCODE => l_retcode
,p_person_id => l_images_tbl(i).parent_id
,p_image_id => l_images_tbl(i).image_id
);
l_commit_count := l_commit_count + 1;
IF l_commit_count = l_COMMIT_CYCLE THEN
l_commit_count := 0;
COMMIT;
END IF;
END LOOP;
END IF;
COMMIT;
END;
/
COMMIT;
EXIT;
If any of the uploaded images are corrupted or using an unsupported image, you may see the error ORA-29400: data cartridge error when running this. You will need to identify and fix the corrupted image before this script will run. For example, by changing the above csr_all_images cursor to run for one or a subset of person ids at a time.
2. Run the Faceted Search Crawler concurrent program
The faceted search crawler indexes the URL to the image, so you will need to re-run this program to see the latest images in the search results.