Image field
What it does
An Image field lets the visitor upload pictures, such as a photo of the packaging a sofa arrived in. You find it in the builder's left panel, in the Files & Media group, and add it by dragging it onto the form, as described in Adding fields and sections.
On the storefront it looks and works like a File field: a drop area that
says "Add files or drop here", with the types jpg, jpeg, gif and png listed under it. Each picture
gets a card with a small preview, its name and its size.
In the admin, the submission shows a preview of each picture above its name. Click the name to download the picture. See Uploaded files.
When to use
- Use Image when you only want pictures. If you also want large photos made smaller, turn on Resize Uploaded Image.
- Use File when visitors may also send documents such as a PDF receipt, or when you need other picture
types, such as
heicfrom phones.
Settings
Go to Content → WebForms → Manage Forms, click the form's name, then click Form Builder. Click the field on the form. Its settings show in the right panel, on the tabs General, Validation and Appearance. You'll change these settings most often:
- Resize Uploaded Image (General tab) makes a large picture smaller when it arrives. Maximum Width and Maximum Height are in pixels. The picture keeps its proportions: with both set to 800, a photo of 2400 × 1800 pixels is saved at 800 × 600. Only the smaller picture is kept.
- Enable Dropzone and Dropzone Text work as on a File field.
- Allowed File Size (Validation tab) is the largest picture in kilobytes (KB). When it's empty, the Image Upload Limit (KB) of your store applies, 1000 KB unless you changed it. See Uploads & Media.
- Maximum Files in Dropzone is how many pictures the visitor can add. When it's empty, the limit is 5.
An Image field has no Allowed File Extensions setting: it always takes jpg, jpeg, gif and png.
All settings of this field
| Setting | Where in the panel | Values | Translatable |
|---|---|---|---|
| Enable Field | General → Basic | On or off | No |
| Label (required) | General → Basic | Text | Yes |
| Field Code | General → Basic | Text | No |
| Required | General → Basic | On or off | No |
| Required Error Message | General → Basic | Text | Yes |
| Help Text | General → Basic | Formatted text | Yes |
| Tooltip | General → Basic | Formatted text | Yes |
| Enable Dropzone | General → Field Settings | On or off | No |
| Dropzone Text | General → Field Settings | Text | Yes |
| Resize Uploaded Image | General → Field Settings | On or off | No |
| Maximum Width | General → Field Settings | Number | No |
| Maximum Height | General → Field Settings | Number | No |
| Hide in Submissions | General → Submission Display | On or off | No |
| Allow in Staff Email Subject | General → Submission Display | On or off | No |
| Submission Label | General → Submission Display | Text | Yes |
| Personal Data | General → Privacy | By field type — Personal data, Not personal, Personal data | No |
| Allowed File Size | Validation → File Rules | Text | No |
| Maximum Files in Dropzone | Validation → File Rules | Number | No |
| Desktop | Appearance → Layout | Width: Full (1/1), Half (1/2), Third (1/3), Quarter (1/4), Fifth (1/5), Sixth (1/6), 2/3, 3/4, 2/5, 3/5, 4/5, 5/6; New row: on or off | No |
| Tablet | Appearance → Layout | Width: Full (1/1), Half (1/2), Third (1/3), Quarter (1/4), Fifth (1/5), Sixth (1/6), 2/3, 3/4, 2/5, 3/5, 4/5, 5/6; New row: on or off | No |
| Mobile | Appearance → Layout | Width: Full (1/1), Half (1/2), Third (1/3), Quarter (1/4), Fifth (1/5), Sixth (1/6), 2/3, 3/4, 2/5, 3/5, 4/5, 5/6; New row: on or off | No |
| Show Label | Appearance → Style | On or off | No |
| Help Text Position | Appearance → Style | Below input, Above input | No |
| Container Classes | Appearance → CSS | Text | No |
| Input Classes | Appearance → CSS | Text | No |
| Custom Attributes | Appearance → Advanced | Text | No |
| Inline Style | Appearance → Advanced | Text | No |
Validation
| Check | What the visitor sees |
|---|---|
| A picture larger than the limit | The picture stays in the list with "Selected file exceeds allowed size: 1000 kB", with the limit that applies. |
| Too many pictures | When the limit is reached, the drop area disappears. If the visitor chooses more pictures at once than fit, the extra ones are left out without a card. |
As on a File field, a refused picture stops the form from being sent until the visitor removes it with its ×.
The size check runs on the picture as the visitor chose it, before any resizing. To accept large phone photos and keep small copies, raise Allowed File Size and turn on Resize Uploaded Image.
Logic
- Start a rule: no. An Image field can't start one. Its Logic tab appears only once a rule shows or hides it, and lists that rule.
- Show or hide this field: yes, from a rule that starts on a field with options. See Show or hide fields and sections.
- Email conditions: no. An Image field isn't offered in a notification's conditions.
Limits
- Notifications and PDF documents list each picture by name and size. They don't show the picture itself. To send the pictures, attach them to the email. See Attachments and PDFs in emails.
- Once a picture is resized, the original size is gone.
- A very large picture isn't resized. If it has more pixels than the store's Upload Resize Limit (Megapixels), 50 megapixels unless you changed it, it's saved as uploaded. A file the server can't read as a picture is kept as it is too. See Uploads & Media.
- A picture with more pixels than the store's Thumbnail Size Limit (Megapixels), 25 megapixels unless you changed it, is still accepted. It shows as a file icon instead of a preview.
Troubleshooting
- A visitor's phone photo is refused as too large. If Allowed File Size on the Validation tab has a value, raise it. If it's empty, raise the store's Image Upload Limit (KB).
- A visitor can't upload a
heicorwebppicture. An Image field takes onlyjpg,jpeg,gifandpng. Use a File field and addheicorwebpto its Allowed File Extensions.
What's next
- File field: accept documents and other file types.
- Uploaded files: see who can open the files and how to download them.