Image File
This component lets you bring an image into your Nappai workflow. You can upload a picture or pick one that’s already stored in Nappai, and the component will give you the image data in a format that other components can use.
⚠️ DEPRECATION WARNING
This component is deprecated and will be removed in a future version of Nappai. Please migrate to the recommended alternative components.
How it Works
When you choose an image file, the component checks that the file type is one of the supported image formats (e.g., jpg, png, gif). It then reads the file from your local machine or from Nappai’s file storage, converts the image into a base64‑encoded string, and packages that string together with the file’s path. The base64 string is useful for sending the image to other components that need the raw image data, while the file path lets you reference the original file later in the workflow.
Inputs
- Upload file or select image: Choose an image file from your computer or from Nappai’s file system. Supported file types are listed in the component’s information panel.
- Silent Errors: If you check this box, the component will quietly ignore any problems (like an unsupported file type) instead of stopping the workflow with an error.
Outputs
- Data: A
Data
object that contains two pieces of information:file_path
: The location of the image file in Nappai’s storage.image
: The image encoded as a base64 string.
- Files: A
Message
object that includes the image file itself, ready for download or for use by other components that expect a file.
Usage Example
- Drag the Image File component onto your canvas.
- Click the Upload file or select image field and pick a picture (e.g.,
photo.jpg
). - Leave Silent Errors unchecked unless you want the workflow to keep running even if the file is wrong.
- Connect the Data output to an Image Processor component that will analyze or transform the image.
- If you need the original file later, use the Files output to download or pass it to another component.
Related Components
- Image Processor – Apply filters or transformations to an image.
- Image Resizer – Change the dimensions of an image before sending it to a model.
- Image Classifier – Use a machine‑learning model to label the image.
Tips and Best Practices
- Stick to the supported image formats (jpg, png, gif) to avoid errors.
- Keep image files reasonably small; large files can slow down the workflow and increase memory usage.
- If you’re building a long‑running workflow, consider enabling Silent Errors so that a bad image won’t stop the entire process.
Security Considerations
- The component only reads files that you explicitly upload or select, so it won’t automatically access sensitive data.
- Base64 encoding is safe for transport, but be mindful of the file size—very large images can consume a lot of bandwidth when passed between components.