How to add a photo for each record of a database

What you'll learn

Show a different photo on each card: link the photo object to a database field that holds the photo's file name, choose the folder where eMedia Cards finds the photos, and let eMedia Cards name each new photo from the record when you add it in Operating mode.

Download the sample files

ZIP, 579 KBLarkspur Hill School Student Card.eccs, New photos/Student 20.jpg, Photos/ (19 pictures), README.txt, students.csv

Before you start

  • eMedia Cards installed and activated, any edition. File naming with Formula needs the Standard edition or higher.

  • This example uses Larkspur Hill School Student Card.eccs and students.csv, 20 students in a CSV file (UTF-8, ; separated). Each row of the Photo column holds a file name from the Photos folder, for example LHS-26001.jpg.

  • Record 20, Zoe Adeyemi, has no photo yet. Her photo is in the New photos folder as Student 20.jpg.

  • The template, the CSV file and the two folders are in the download above, with a README.txt. Unzip it to keep this layout. The school and the students are fictitious.

How to connect the students

  1. Open Larkspur Hill School Student Card.eccs and switch to Design mode.

  2. Click Tools > Connect to database..., then connect students.csv as in How to connect a card template to a CSV file: Excel / CSV, CSV delimiter: ;, File encoding: UTF-8, and Key column: StudentID.

  3. In Link & Summary, a column with the name of a card object is linked automatically: here StudentID, FirstName, LastName, Class and Photo. The type of the Photo column is Image Path: it holds the name of a picture file.

  4. Click Connect Data Source.

Database Wizard, Link & Summary step: Linked objects 5, and the Photo column of type Image Path linked to the Photo object
  1. Click Photo in Layers. Picture object properties opens.

  2. Under Contents, in Picture store, choose DB field as a path to a file. It is already set in this template.

Picture store list open on Photo with No picture, External file on disk, Template file, DB field as a path to a file and Google Drive
  1. In DB Field, choose the column that holds the file name: Photo.

The field can hold a file name or a full path.

How to name the new photos

File naming sets the file name of a photo you take with the webcam, or browse and copy, in Operating mode:

File naming Name of the new photo
Automatic A new, unique name made by eMedia Cards. This is the default.
Manual A new, unique name made by eMedia Cards.
Database field The value of the field chosen in Naming DB field, for example the student ID.
Formula The result of the formula in Formula:. Needs the Standard edition or higher.
  1. In File naming, choose Database field.

  2. In Naming DB field, choose StudentID. Zoe's new photo will be LHS-26020.jpg.

Picture object properties for Photo: Picture store DB field as a path to a file, DB Field Photo, File naming Database field and Naming DB field StudentID

How to choose the photos folder

  1. Click an empty area outside the card. The Card properties panel opens.

  2. Under Database pictures folder, in Location, choose where eMedia Cards finds and saves the photos:

    • Use default: the Default folder in Tools > Options... > Acquisition, under Pictures.

    • This template's folder: the folder of the card file.

    • Subfolder of this template: a folder inside it, named in Subfolder. Here: Photos, already set in this template.

    • Specific folder: any folder, chosen with ....

  3. Looks in: shows the folder eMedia Cards uses. See also How to connect a card template to an Excel file.

Card properties, Database pictures folder: Location Subfolder of this template, Subfolder Photos, and the Looks in: line ending in Photos
  1. Click File > Save... to keep the connection and these settings in the template.

To show a photo, eMedia Cards looks for the file named in the field in this order: the path in the field, then the folder in Location, then the Default folder in Tools > Options..., then the template's own folder.

How to add the photo of one record

  1. Click View > Operating mode. Each card shows the photo named in its Photo cell.

Operating mode with Leo Martin's student card and photo, and the records grid with the Photo column
  1. Click Last at the top of the Input panel, or click row 20 in the records grid. Zoe Adeyemi's card has no photo.

  2. Click Edit. OK and Cancel replace the record buttons.

Record 20 of 20 in edit mode: OK and Cancel at the top of the Input panel, and an empty photo frame on Zoe Adeyemi's card
  1. Next to Photo, click Browse for a picture and open New photos\Student 20.jpg. eMedia Cards copies it into the Photos folder as LHS-26020.jpg, and the Photo field shows LHS-26020.jpg. To take the photo with a webcam instead, click Acquire picture. See How to take a photo with a webcam.

  2. Click OK. The record is saved: in students.csv, the Photo cell of row 20 is now LHS-26020.jpg.

Zoe Adeyemi's card with her photo, and LHS-26020.jpg in the Photo column of row 20

For the next record, click Next, Edit, add the photo, and click OK.

How to keep the photos in the database

Some databases can keep the picture itself instead of a file name. Picture store then has more choices:

  • DB field as a binary object keeps the picture in a database field. It needs the Professional edition. In other editions, it does not appear in the list.

  • DB field as the picture is for a picture field of a FileMaker database.

  • Google Drive keeps the photos in a Google Drive folder. See How to add a photo to a card.

Tips

  • Copy browsed pictures, in Tools > Options... > Acquisition, under Pictures, is on by default: a picture you open with Browse for a picture is copied into the photos folder and named with File naming. The original file is not deleted. Off, the record keeps the path of the file you opened.

  • If a file with the new name is already in the folder, eMedia Cards adds a number in brackets to the name instead of replacing the file.

  • When you add a new record, type the student ID before you take the photo. If Naming DB field is still empty, the photo gets a temporary name, and eMedia Cards renames it when you save the record.

  • Auto-frame face, Automatic zoom and Photo studio apply to every photo of the object. See How to crop and zoom a photo on a card and How to remove a photo's background.

  • Keep the template, the CSV file and the Photos folder together when you copy them to another PC.

Common errors

Symptom Cause Fix
The photo frame stays empty in Operating mode. The file named in the field is not in the folder shown in Looks in:, or the name is different. Put the photo in that folder, or correct the file name in the record.
Moving a picture stored in a database field can only be done while creating or modifying the record! The record is not in edit mode. Click Edit first.
The formula set for naming the picture filenames caused an error. Please check. The formula in Formula: cannot be calculated for this record. Correct the formula, or choose Database field.
Not available per record when the picture is stored in the field. Set it for every record in Design mode. Picture store is DB field as the picture: Adjust picture works for every record only. Set the framing in Design mode.

Last reviewed: 2026-11-18