> For the complete documentation index, see [llms.txt](https://docs.heisenware.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.heisenware.com/reference/widgets/input/photo.md).

# Photo

Captures webcam photos with aspect-ratio crop and quality presets — legacy, superseded by Upload

<figure><img src="https://3495989837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FE5Ketpww1s7TauSAJrJ8%2Fuploads%2Fgit-blob-1e8bd8d59479da6bc8da2cdb483070fff8d20338%2Fwidget-photo.png?alt=media" alt="Damage report panel with a Take photo button" width="568"><figcaption></figcaption></figure>

The photo widget takes pictures with the device camera, cropped to a fixed aspect ratio and in the quality you choose. After each picture your logic receives what the widget holds: the photo itself when it holds one, a list of photos when it holds several, ready for a [`file` or `files` field](https://docs.heisenware.com/reference/functions/storage/relational-database.md#files-in-a-table). For new Apps, use the upload widget instead: it takes photos as well as files, and it replaces this widget.

**Good for:** damage and quality photos in existing Apps.

## Properties

The widget's General tab lists these properties under Receives and Emits. Drop an executor's output, input or trigger onto a row to link it. An example also fills an unlinked widget as demo data in the App Builder.

{% tabs %}
{% tab title="Emits" %}
**`images`** (into an input, `object | Array<object>`): Writes what the widget holds after every photo taken or removed. Holding one photo (`maxPhotos` is 1, the default) it writes that photo's entry, and nothing once it is empty; holding several it writes the list of their entries. Reads either shape.

**`onClick`** (fires a trigger): Triggers the linked executor when a photo is captured.
{% endtab %}
{% endtabs %}

## Settings

Double-click the widget in the Page editor to open its settings, grouped in these tabs. Settings marked *set per screen* are pinned by nature: every screen keeps its own value.

<details>

<summary>Look &#x26; feel</summary>

* **Storage type**: File uploads each photo as JPEG into the workspace's file store and delivers a reference; buffer keeps it in the value as base64, at most 64 kB altogether. Choices: File, Buffer.
* **Button**: The button members press to scan, upload or take a photo.
  * **Button Text**: Label shown on the button; empty shows none.
  * **Icon**: Font Awesome class of an icon shown left of the label, e.g. fa-light fa-camera; empty shows none.
  * **Text Size**: Font size of the label in px. Range 8 to 40. *Set per screen.*
  * **Icon Size**: Size of the icon in px. Range 20 to 100. *Set per screen.*
  * **Button Type**: Color scheme: default uses the accent color, normal is neutral, success green, danger red. Choices: Default, Normal, Success, Danger.
  * **Styling Mode**: Contained fills the button with its color, outlined draws only a border, text shows the label alone. Choices: Text, Contained, Outlined.
  * **Hover Text**: Tooltip shown while the pointer rests on the button; empty shows the label or nothing.
  * **Initially Disabled**: Starts the button greyed out and unclickable until a bound button value enables it.
* **Aspect ratio**: Width-to-height ratio of the crop frame over the camera view; portrait orientation flips it. Choices: 16/9, 4/3, 7/5 (DIN A4).
* **Resolution**: JPEG quality of the saved photo: low 50%, medium 80%, high 100%; the camera stream is always asked for 1920x1080. Choices: Low, Medium, High.
* **Orientation**: Portrait makes the crop frame taller than wide, landscape wider than tall. Choices: Portrait, Landscape.
* **Maximum number of photos**: Number of photos the widget holds; the button disables once reached. With 1 the widget delivers that one photo (for a file field), with more a list of photos (for a files field).
* **Thumbnail size**: Height of the preview thumbnails. Range 40 to 400. *Set per screen.*

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.heisenware.com/reference/widgets/input/photo.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
