Image Picker¶
The Image Picker feature represents the main page and allows users to select images for virtual try-on from various sources.
When to Use¶
- Let users select photos from their device
- Allow users to take new photos with the camera
- Provide predefined models images for try-on
- Enable users to reuse and manage previous images
Sources¶
Camera¶
Allows users to take new photos using their device's camera.
Uses the platform's standard camera tools for applications.
Customization
Customization¶
Icons¶
camera24
- Icon for the camera button in the bottom sheet list
Text Elements¶
cameraButtonTakePhoto
- Label for the button used to take a photocameraPermissionTitle
- Title for the camera permission alertcameraPermissionDescription
- Description for the camera permission alertcameraPermissionButtonOpenSettings
- Label for the button that opens app settings
Photo library¶
Enables users to select photos from their device's photo library.
Uses the platform's standard photo picker.
Customization
Customization¶
Icons¶
gallery24
- Icon for the gallery button in the bottom sheet list
Text Elements¶
galleryButtonSelectPhoto
- Label for the button used to select a photo
Predefined Models¶
Provides a selection of predefined models images for virtual try-on. Models are divided into categories, each containing a set of model images with different body shapes. This allows users to select models that best match their preferences and needs, offering a personalized virtual try-on experience, while allowing them not to use their own photos.
Models data¶
The SDK gets categories and the corresponding model lists from the Aiuta backend. Apps don't need to provide any data for this.
By default, there two categories: woman
and man
in that order.
If necessary, categories can be fully customized in agreement with Aiuta.
Predefined models, History and User data
If you use your own history data provider
and manage image files when they are added to or deleted from the user's history, please note:
- The link to the image used with the model can be saved in the user's history
- The file with the model image should not be moved to the user's storage, it is a shared file and does not belong to a specific user
- When deleting from the user's history, the link to the image must be deleted, but the file with the model image itself cannot be deleted
Customization
Customization¶
Icons¶
selectModels24
- Icon for the predefined models button
Text Elements¶
predefinedModelsTitle
- Title of the predefined models page and buttonpredefinedModelsOr
- Label displayed before the predefined models buttonpredefinedModelsEmptyListError
- Error message for empty model listpredefinedModelsCategories
- Mapping of category IDs to titles (e.g., "man", "woman")
Uploads History¶
Allows users to access and reuse their previously used images.
The last image used will be preselected in the image picker for subsequent try-ons.
History Data¶
Each image in the history is defined by the following properties:
id
- A unique identifier for the imageurl
- The address of an image resourcetype
- The type of the image.
Image Type
Is this context of images used as input it is:
Image uploaded by the user (taken from the camera or gallery). This image belongs to the user. When the user removes the image from the history, it should be deleted from the storage as well.
Image of the model, provided by the Aiuta. This image could be linked to the user history, but it is not owned by the user, and should not be deleted, only unlinked from the user's history in case of removing.
Data Management¶
By default, the SDK uses platforms' local storage to store the history. This is the simplest approach and requires no additional configuration.
Anonymous data
Neither the SDK nor the Aiuta API have any information about your users; all uploaded images are completely anonymous and are not linked to any user. Data in the history is stored locally on the device and may be lost when the app is reinstalled.
If you need to link images to a user profile, use Data Provider instead.
You can implement your own custom history data provider that:
- Provides the
uploadedImages
list of images previously used by the user - Reacts to the
addUploadedImages
callback to store new images - Reacts to the
deleteUploadedImages
callback to remove images by the user choise - Reacts to the
selectUploadedImage
callback to reorder images when reused
This allows you to
- Integrate with your existing user management system
- Sync the uploads history across devices
- Implement custom business logic for history management
- Control how images are stored and accessed
Customization
Customization¶
Text Elements¶
uploadsHistoryButtonNewPhoto
- Text for the new photo buttonuploadsHistoryTitle
- Title for the uploads history screenuploadsHistoryButtonChangePhoto
- Text for the change photo button
Styles¶
changePhotoButtonStyle
- Style for the "Change Photo" button:blurred
- Default blurred style with optional outlineprimary
- Solid button with primary background color
Analytics¶
The following analytics events are tracked during image selection:
Type | Event | Page Id | Description |
---|---|---|---|
page | imagePicker | Image picker page opened | |
picker | cameraOpened | imagePicker | Camera interface opened |
picker | newPhotoTaken | imagePicker | New photo taken with camera |
picker | photoGalleryOpened | imagePicker | Photo gallery opened |
picker | galleryPhotoSelected | imagePicker | Photo selected from gallery |
picker | uploadsHistoryOpened | imagePicker | Uploads history opened |
picker | uploadedPhotoSelected | imagePicker | Previously used photo selected |
picker | uploadedPhotoDeleted | imagePicker | Previously used photo deleted |
picker | predefinedModelsOpened | imagePicker | Predefined models list opened |
picker | predefinedModelSelected | imagePicker | Predefined model selected |
exit | imagePicker | SDK was closed on the image picker page |
How to implement¶
- Android
- iOS
- Flutter