This article explains how to use images/videos in Dualite and how to reference them correctly and reliably when working with visuals in your project.
There are two supported ways to do this:
Adding images directly to your Dualite project
Hosting images/vidoes externally using Supabase and referencing them via public URLs
You can choose the method that best fits your use case. For small projects or quick iterations, adding images directly to the project is usually sufficient. For larger or more dynamic setups, external hosting is recommended.
Method 1: Add Images Directly to Your Dualite Project
Dualite allows you to upload images directly to your project and reuse them across your project.
This is the simplest way to work with images in Dualite.
Step 1: Add Images to the Project
Write the message or open an existing Dualite project. Click on the + button and click on Add Images to Project. Upload images from your computer.
You can add up to 10 images per project. Once uploaded, these images are stored at the project level and can be used anywhere in the project.
Step 2: Attach Images Where Needed
After images are added to the project:
Images can be attached and detached at any time
Detaching an image does not remove it from the project. It simply means that the particular image will no longer used in your project
This makes it easy to adjust image placement as your UI changes.
Step 3: Reuse Images Across the Project
The same image can be reused in multiple places
No need to re-upload images for each use
Images remain available unless explicitly removed from the project
This method works well for small dashboards, profile images, icons, and static visuals.
Method 2: Hosting and Using Images in Dualite
Step 1: Set Up Supabase
To begin hosting your images, weâll use Supabase, a free, user-friendly backend platform that includes public image storage.
In your Dualite prompt, include both the task and the user image clearly. For example:
Conclusion
While Dualite doesnât support uploading images directly into individual components, it offers flexible ways to work with visuals depending on your projectâs needs.
For smaller projects or quick iterations, adding images directly to your Dualite project lets you attach and detach visuals easily without any external setup. When your use case growsâsuch as handling many images, dynamic content, videos, or user-generated mediaâexternal services like Supabase provide a reliable and scalable solution.
Whichever method you choose, the key is structure and clarity. Make sure each image is clearly associated with its intended content, and be explicit about where it should appear in your project. With the right setup, integrating images into your Dualite builds becomes straightforward, dependable, and easy to maintain as your app evolves.