pl-image-capture element¶
Provides a way for students to capture and submit an image as part of their answer using a local camera like a webcam, an external device such as a mobile phone or tablet camera, or an image already stored on their device.
Sample element¶

<pl-image-capture file-name="solution.jpeg" mobile-capture-enabled="true"></pl-image-capture>
Customizations¶
| Attribute | Type | Default | description |
|---|---|---|---|
allow-blank |
boolean | false | When true, students can submit without capturing an image for this element. This is useful when a question has multiple pl-image-capture elements and students may not need all of them (e.g., some students fit their work in fewer images than others). |
file-name |
string | — | The name under which the captured image will be saved. This must end with .jpeg or .jpg, and be unique within a single question. |
manual-upload-enabled |
boolean | true | When true, students can click "Upload image" to upload JPEG, PNG, HEIC, or HEIF images already stored on their device. All submitted images are stored as JPEGs. This is especially useful for students who write on a tablet and export their work as an image. Set to false to disable manual uploads. |
mobile-capture-enabled |
boolean | true | When true, students can click "Capture with mobile device" to scan a QR code on a phone or tablet to a page where they can capture an image of their work. In most cases, this mobile-capture-enabled should be true. |
Details¶
The pl-image-capture element is particularly useful for capturing handwritten work on paper, such as sketches or step-by-step calculations.
pl-image-capture allows users to submit images through their camera, whether it’s a local device like a webcam or an external device such as a mobile phone or tablet camera. Users can submit by capturing a new image with their camera or uploading existing images from their device. Manual uploads are enabled by default; set manual-upload-enabled="false" to disable them. pl-image-capture does not save images to their device.
AI grading supports pl-image-capture. Handwritten mathematical work, graphs, diagrams, and any other free-form image submissions can be graded automatically. Questions can combine pl-image-capture with other supported elements such as pl-file-upload; each distinct submitted file is sent to the model once. Learn more in the AI grading docs.
A single question page can contain multiple pl-image-capture elements, each operating independently and saving files under its specified file-name.
In manual grading mode, staff can view submitted images in the submission panel and, if added, through the pl-file-preview element, where submitted images will appear under their associated file-name.
By default, the mobile-capture-enabled setting is true. We strongly recommend keeping mobile capture enabled for most questions to allow students to capture high-quality images easily.
Using mobile device capture in a local development environment requires additional setup. To use this feature locally, see the Setting up external image capture locally section of the server configuration guide.
Accessibility¶
Manual uploads improve accessibility for students who have difficulty drawing or writing on paper, holding paper in view of a webcam, or positioning and holding a phone steady to photograph their work. Keeping manual uploads enabled lets students submit work created with digital tools or images captured using other equipment, such as a scanner.
Example implementations¶
See also¶
pl-file-previewto display previously submitted files- AI grading for handwritten and image submissions