Adding photos to Person documents

In a hybrid environment, you can enable the Name Finder Show user photo option to use photos in the IBM® Domino® directory. Before you do, add photo fields to the directory design and then add photo image files to the directory.

About this task

Make the changes described in this procedure to a synchronized directory that replicates to the service.

Procedure

  1. Make a backup copy of your pubnames.ntf file.
  2. From IBM Domino Designer, open pubnames.ntf.
  3. Click Shared Elements > Subforms.
  4. Double-click the $PersonInheritableSchema subform.
  5. Create a field called Photo:
    1. In the Basics tab, click Create > Field.
    2. In the Name field of the properties box, type Photo. In the Type field, select RichTextLite.
    3. Click the second tab of the properties box and complete the following fields:
      • In the Only allow field, select Thumbnail.
      • Select Resize Thumbnail Image, in pixels.
      • In the Width field, select 85.
      • In the Height field, select 74.
      • In the Image attachment name field, type ContactPhoto.
    4. Click the sixth tab of the properties box. Clear the following Hide paragraph from fields to ensure they are not selected so that the field is visible:
      • Notes R4.6 or later
      • Web browsers
      • Mobile
    5. Select the new Photo field. In the Objects panel, click the onChange event and add the following code to it:
      Sub Onchange(Source As Field)
      	Dim ws As New NotesUIWorkspace
      	Dim uidoc As NotesUIDocument
      	Dim doc As NotesDocument
      	
      	Set uidoc = ws.CurrentDocument
      	Set doc = uidoc.Document
      	Call doc.ReplaceItemValue("PhotoModified", Now())
      End Sub
  6. In the $PersonInheritableSchema subform, create a hidden field called PhotoModified:
    1. In the Basics tab, click Create > Field.
    2. In the Name field of the properties box, type PhotoModified. In the Type field, select Date/Time.
    3. Click the second tab of the properties box and complete the following fields:
      • Select DisplayTime.
      • In the Show field, select Hours and minutes.
      • In the Time zone field, select Adjust time to local zone.
  7. Save and close the subform.
  8. Replace the design of your directory database with the new version of the pubnames.ntf template.
  9. To add a photo to a Person document, open the Person document in the directory, click the photo field that you created, select the image file, and save the document.

What to do next

Enable the Name Finder option Show user photos and do not select Use IBM Connections Cloud photos.