Image Size - The recommend avatar image size is 128 x 128 pixels. The iOFFICE image storage system will automatically compress large images.
Data Format - iOFFICE can process a single file containing Base64 encoded images or a folder of client images. Valid image extensions are .jpeg, and .png. Specifics for each method are as follows:
Base64 Encoding File Requirements
- The data must be a single flat file (.csv, .pipe, .txt, etc).
- The file must contain columns with enough information to identify a single user (generally employeeId) to which the image will be tied, and must contain a column containing the Base64 image string.
- All of the images must be the same format (Base64 jpeg, or Base64 png).
Folder of Pictures File Requirements
All pictures must be named consistently, and with text that will unique identify the person in the picture (generally employeeId).
- All pictures must be in the same format (.jpeg, or .png).
Client data is processed with the following logical flow:
- Input data is parsed and matched to an internal iOFFICE UserID.
a. If input is a flat file, the file is parsed by columns.
b. If input is a folder structure of image files, the filenames are parsed and used to identify users.
- Images are encoded.
a. If the input is a flat file, the base64 column is converted to byte data, and saved to a file with the appropriate extension (.jpeg or .png). The image will be named FirstName_LastName_UserID.extension.
b. If the input is a folder structure of image files, the images are already encoded.
- Images are saved to the iOffice image storage system. Starting at this point, there is no difference in steps stemming from the input data type.
- A record of the "UserAttachment" is created in the Client's Site, linking the UserID to a unique ID created by the storage system. The image (called an "attachment" in the iOFFICE environment) will also be given a description of FirstName_LastName_UserID
- The process is only designed to add new user avatars. If the user already has an image attachment, their image will not be updated.
a. If there is a need to replace single images, they can be done individually by a site administrator.
b. If there is a need to replace a large number of images, a separate process will need to be used to remove existing images, so that new images can be added.
- The process cannot mix and match image types.
- The process cannot alter the size of the image. If site downtime due to image conversion is a concern, the image files should be compressed before being given to iOFFICE.