The original version of this document is located at at https://docs.qfield.org/how-to/pictures
In QField, a field with Attachment widget can be used to:
!
To configure the Widget, please refer to the Attributes Form Documentation
:material-monitor: Desktop preparation
One or more pictures can be added to the feature. Here is an example of how to proceed.
It is necessary to set up two tables. One table where the features are stored and one with a list of pictures.
| Field | Type |
|------------|------------|
| id
| Text (UUID)|
| geometry
| Geometry |
| ...
| |
| 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!
Set the default value of the field id to uuid()
or use the UUID Generator widget. No need to show it in the form.
!
Set the relation widget to many to one relation and add the relation to the form
!
Set the widget type of the field path to Attachment and add it to the form
!
:material-tablet: Fieldwork
Some mobile devices will require for native camera mode to be turned off to enable geotagging.
To enable geotagging in case your native OS camera does not support this functionality, follow these steps:
:material-monitor: 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:
:material-monitor: Desktop preparation
The advanced settings allow rescaling the photos to a maximum width/height in QFieldSync plugin > Project configuration
:material-monitor: Desktop preparation
QFieldSync provides the possibility to configure the path 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 directories. All paths are relative to the project directory.
!
!!! note QGIS 3.14 or newer is required for this functionality