The original version of this document is located at https://docs.qfield.org/how-to/project-setup/pictures
In QField, a field with Attachment widget can be used to:

To configure the Widget, please refer to the Attributes Form Documentation
🖥️ Desktop preparation
It is also possible to add more pictures to the feature either by having several attachment field attributes or by creating a relation to a separate table where the image paths are shown.
In this section we will show you an example how this is done.
A relation to a second layer needs to be set in the QGIS properties so that when adding images or other formats, these are stored in the related table.
Workflow
Create two two tables following the style as shown below.
One table where the features are stored and one with a list of pictures.
Apiary:
| Field | Type |
|---|---|
id |
Text (UUID) |
geometry |
Geometry |
... |
Apiary_pictures:
| Field | Type |
|---|---|
id |
Text (UUID) |
apiary_id |
Text (UUID) |
path |
Text |
... |
Create a relation with:
apiary Referenced layerid Referenced fieldapiary_picture Referencing layerapiary_id Referencing fieldstrength Composition
Once you have created the relation the relation can be properly configured in the feature layer’s attribute forms.
In the apiary layer we have to specify a default value to create a unique id.
For the apiary_picture layer, you will have to change the widget type to Attachment
Workflow
Apiary
uuid('WithoutBraces').
Set the relation widget to many to one relation and add the relation to the form

Apiary_picture
path to Attachment
QField has an in-app drawing and sketching functionality enabling you to directly sketch over and annotate images captured while in the field as well as drawing on top of a blank canvas or over a template.
On top of annotating captured images, QField supports drawing from image templates.
The following two methods are available to add templates:
drawing_templates folder located alongside a project file and populate it with images.drawing_templates folder found inside your QField app folder.Templates shipped alongside projects as well as the QField app folder will be shown when users choose “Draw a sketch” by pressing the (⋮) menu icon of the attachment widget.

📱 Fieldwork
QField’s internal; camera will automatically geotag your pictures.
Information about location and direction of the pictures will therefore be baked into the image file.
Note
While with older Android versions it was possible to use other apps like the amazing OpenCamera app for taking pictures and preserving EXIF information from there, this is no longer with recent Android versions.
Is recommended to disable Use native Camera in the settings to preserve EXIF information.
QField allows you to add image stamping.
This is configured directly from the QFieldSync plugin in QGIS.
With this functionality you can add detailed and formatted information when taking photos in the field.
🖥️ Desktop preparation
Navigate to the Project > Properties > QField > Attachments and Directories sub-panel and click on “Settings” for “Customize image stamping details”.

You can add the following settings:
Font and Alignment: You have full control over the appearance of the stamped text, including the font style (color, size, drop shadow) and horizontal alignment (left, center, or right).
Image Decoration: Add a custom image overlay, such as a logo or a watermark, on top of the captured image.
Force Stamping: This option enforces image stamping, ensuring that all images collected for the project have the required information overlaid, regardless of the individual QField app settings.
Stamp Details: Craft a multiline string using QGIS expressions to define the information stamped on the image.
A default template is provided to get you started, which includes common variables like date, time, and GNSS information.
Default Template:
sql
[% format_date(now(), 'yyyy-MM-dd @ HH:mm') %]
Latitude [% coalesce(format_number(y(@gnss_coordinate), 7), 'N/A') %] | Longitude [% coalesce(format_number(x(@gnss_coordinate), 7), 'N/A') %] | Altitude [% coalesce(format_number(z(@gnss_coordinate), 3) || ' m', 'N/A') %]
Speed [% if(@gnss_ground_speed != 'nan', format_number(@gnss_ground_speed, 3) || ' m/s', 'N/A') %] | Orientation [% if(@gnss_orientation != 'nan', format_number(@gnss_orientation, 1) || ' °', 'N/A') %]

Example

🖥️ Desktop preparation
Sometimes you might be interested in automatically storing Geotags such as the latitude, longitude, orientation, etc.
This information is also known as EXIF tags.
To store the EXIF information, follow these steps:
exif(@project_folder + '/' + "path", 'Exif.Image.Orientation') retrieves the orientation of the picture stored in path.🖥️ Desktop preparation
The advanced settings allow rescaling the photos to a maximum width/height in Project > Properties > Attachments and Directories

🖥️ Desktop preparation
QFieldSync provides the possibility to configure the path and the file names of picture attachments.
Use expressions to specify the path of the attachments.
By default, pictures are saved into the “DCIM” folder, audio are saved into the “audio” folder and videos are saved into “video” with a timestamp as name.

Additional directories can be synchronized with pictures or other attachments.
Extra paths can be configured in Attachment and Directories tab in the QFieldSync settings under Project > Properties > QField.
All paths are relative to the project directory.
