Use Attachment¶
In QField, fields configured with the Attachment widget can:
- Display and capture photos.
- Display and record video clips.
- Listen to and record audio clips.
- Display links to external files like PDFs or documents.
Refer to the Attribute Form Documentation to configure the widget in QGIS.
In-App Camera Interface¶
Trabajo de campo
The built-in QField camera interface provides live toggles and post-capture editing tools when taking photos inside an attachment widget:
Live Capture Controls¶
- Camera switch: Toggles between front-facing and rear-facing camera lenses.
- Resolution and aspect ratio: Adjusts photo resolution and frame dimensions to manage file sizes and image layouts.
- Live image stamping: Toggles a real-time text overlay directly onto the photo canvas. By default, the stamp applies context details such as date, time, latitude, longitude, altitude, ground speed, and heading orientation in degrees (configure the stamp using expressions).
- Location metadata (EXIF): Toggles whether geographic metadata is saved directly inside the image file structure.
- Composition grid: Displays a rule-of-thirds grid overlay on the screen to assist with framing and aligning photos in the field.
Photo Preview and Quick Editing¶
A preview screen displays after photo capture to inspect and manually adjust images before saving them to your project. A floating toolbar above the capture button offers the following editing options:
- Rotate Counter-Clockwise": Rotates the photo 90° to the left.
- Mirror / Reflect": Flips the photo horizontally.
- Rotate Clockwise": Rotates the photo 90° to the right.
Applied rotations or reflections bake permanently into the saved JPEG image alongside active image stamps or EXIF metadata.
Add a Series of Pictures to a Feature¶
Project Manager
Add multiple photos to a single feature using multiple attachment attributes or by creating a layer relation to a child photo table. This section illustrates configuring a 1:N photo relation. Set up a layer relation in QGIS project properties to store newly captured media in a related table.
Flujo
- Create two database tables in your data source using the schema structure below:
Apiary (parent feature layer):
| Field | Type |
|---|---|
id |
Text (UUID) |
geometry |
Geometry |
... |
Apiary_pictures:
| Field | Type |
|---|---|
id |
Text (UUID) |
apiary_id |
Text (UUID) |
path |
Text |
... |
Relaciones¶
Configure a relation in QGIS with the following properties:
- Referenced layer:
apiary - Referenced field:
id - Referencing layer:
apiary_picture - Referencing field:
apiary_id - Relationship strength: Composition
Configuración del formulario de atributo¶
Project Manager
Configure attribute forms in feature layers after creating the layer relation.
Specify a default value in the apiary parent layer to generate unique primary keys.
Set the widget type to Attachment in the apiary_picture child layer.
Workflow
Parent layer configuration:
- Navigate to Vector Layer Properties... > Attribute Form.
- Select the
idUUID field and set Widget Type to Text Edit or UUID Generator. - Set Default Value to
uuid('WithoutBraces'). - (Optional) Uncheck Editable or hide the field to prevent user modifications.
- Drag the relation into the form layout and set cardinality to Many to one relation.
Workflow
Child layer configuration:
- Navigate to Vector Layer Properties... > Attribute Form for the child layer.
- Select the
pathfield and set Widget Type to Attachment. - Add the field to the attribute form layout.
Drawing and Sketching¶
Trabajo de campo
QField includes built-in drawing and sketching tools to annotate captured images, draw on blank canvases, or sketch over templates.
Drawing Templates¶
QField supports sketching on top of custom image templates in addition to annotating photos.
Add custom templates using two methods:
- Create a
drawing_templatesdirectory alongside your QGIS project file and populate it with image files. QField registers all images insidedrawing_templatesas sketching templates when loading the project. - Add image files to the
drawing_templatesdirectory inside the QField application directory on your mobile device. Find app directory locations at the bottom of the About QField screen.
Templates stored alongside projects or inside the QField app directory display when tapping the three-dotted menu (⋮) on an Attachment widget and selecting Draw a sketch.
Geoetiquetado¶
Trabajo de campo
The integrated QField camera automatically geotags captured photos. Location and heading orientation metadata bake directly into the image file structure.
Note
Disable Use native camera in QField general settings to preserve EXIF metadata on modern mobile devices.
Estampado de imágenes¶
QField allows adding customizable image stamps to captured photos. Configure image stamping options in QFieldSync inside QGIS. Image stamping embeds formatted text overlays and logos directly onto field photos.
Ajustes de estilo¶
Project Manager
Flujo
- Navigate to Project > Properties... > QField > Attachments and Directories.
- Click Settings under Customize image stamping details.
Configure the following image stamping options:
- Font and alignment: Controls text appearance, including font styles, text color, size, drop shadows, and horizontal alignment (left, center, or right).
- Image decoration: Adds custom image overlays (such as logos or watermarks) onto captured photos.
- Force stamping: Enforces image stamping on all captured photos regardless of individual mobile app settings.
- Stamp details: Defines multiline text overlays using QGIS expressions. The default template pre-populates date, time, and GNSS positioning variables.
Default template expression:
```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') %]
```
!
!
Ejemplo
Fetching Geotags (EXIF) from the Image File into the Attribute Table¶
Project Manager
Store EXIF geotag parameters (such as latitude, longitude, and camera orientation) directly inside vector attribute fields.
Para almacenar la información EXIF, siga estos pasos:
Flujo
- Add an attribute per EXIF tag in the table that contains the pictures.
- In the pictures form, configure the default value of each attribute to the corresponding EXIF expression See QGIS EXIF function, and make sure Apply on update is activated.
- The EXIF tags that QField can capture are listed in the QGIS documentation (link above). However, this list might slightly vary depending on the mobile characteristics.
- Capturing EXIF tags requires accessing the full physical path of the picture.
Be sure to reflect this in the QGIS expression.
For example, the expression
exif(@project_folder + '/' + "path", 'Exif.Image.Orientation')retrieves the orientation of the picture stored in path. For more tags visit the QField EXIF reference documentation and the exiv library documentation.
QField extracts and populates EXIF geotag values into attribute tables when taking photos in the field.
Tamaño máximo de la imagen¶
Project Manager
Rescale captured photos to maximum width and height thresholds to save storage space. Configure maximum dimensions by navigating to Project > Properties... > QField > Attachments and Directories.
Ruta de adjuntos configurable¶
Project Manager
QFieldSync ofrece la posibilidad de configurar la ruta y los nombres de los archivos adjuntos de imágenes.
Flujo
- Go to Vector Layer Properties > QField
- Choose the layer, the field and configure the expression
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 extra paths evaluate relative to the project directory.












