---
schema_version: "1"
id: 97522bb36a4917d23af172ecd3dea101f161614d60c7ddf2ed84ee970a52cb53
title: Add a File or Image to Omniscript (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_add_a_file_or_image_to_omniscript.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_add_a_file_or_image_to_omniscript.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: fda15c0d09870f89eca98c479d81f78f7ca1e39c35b4066e28f827942d0c20eb
description: For the managed package runtime, add and configure a File or Image element to enable the upload of files and images. Files and images upload to Content Documents by default.
products:
  - Omnistudio
release: "264"
---
# Add a File or Image to Omniscript (Managed Package)

For the managed package runtime, add and configure a File or Image element to enable the upload of files and images. Files and images upload to Content Documents by default.

![Managed Package app icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/resources-global/_corporate/images/managedpackageicon.png) This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see [Omnistudio Help](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_standard.htm&language=en_US).

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_note.png)

Note

The Image and File elements don't work in preview because they use SFDC components. When Image and File elements are required in a Step, the Preview cannot advance past the Step. Vlocity recommends marking File and Image elements as Required only before activating the Omniscript.

Omniscripts and Flexcards support all image file types by default. If set, the lightning-file-upload `accept` attribute filters file types in the user's file browser. If set, the **Don't allow HTML uploads as attachments or document records** security setting disallows .svg image files. See [Lightning Web Component File Upload](https://developer.salesforce.com/docs/component-library/bundle/lightning-file-upload/documentation).

1. From Omniscript, under Available Components, drag the File or Image element from the **Inputs** section into a **Step** in the Structure panel.
2. To attach the Content Document to a parent record, enter a content parent object ID or comma-separated list of object IDs. When left blank, the Content Document does not attach to a parent record.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_note.png)
    
    Note
    
    In the LWC Omniscript Designer files and images upload to Content Documents by default. By default, the LWC File and LWC Image elements accept a file size of up to 2GB.
3. (Optional) When configuring the Image element, allow uploads of multiple images by selecting **Allow Multiple Images**.
4. (Optional) Use one of the JSON node names from Image and File to apply a condition to another element:
    
    ```
    "yourFileElementName": [
              {
                "data": "0693g000000T1ZFAA0",
                "filename": "isolated-on-png.png",
                "vId": "0683g000000T11iAAC",
                "size": 8234
              }
            ]
    ```

What’s next: When a file is attached to a File element in Omniscript, it adds this JSON to the Data JSON of the form. To map the file's JSON to a Salesforce record, see [Mapping File Attachments From an Omniscript to Salesforce (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_mapping_file_attachments_from_an_omniscript_to_salesforce.htm&release=264.0.0&type=5 "For the managed package runtime, after adding a file or image to an Omniscript, you can map the file from the Omniscript to a parent record in Salesforce. Follow the instructions below to accomplish this:").