Asset Model Reference
Complete property reference for the Asset model in Omnium, including URLs, metadata, and custom properties.
This page documents all properties of the Asset model used for product images, documents, and media files.
Asset Properties
| Property | Type | Description |
|---|---|---|
AssetId | string | Unique identifier for the asset |
AssetType | string | Type classification (e.g., image, document) |
Name | string | Display name |
Description | string | Short description |
AltText | string | Alternative text for images (accessibility/SEO) |
Purpose | string | Asset purpose or use case (e.g., hero, thumbnail) |
SortOrder | int? | Display order when listing assets |
IsMainImage | bool | Flag indicating if asset is the main product image |
ParentId | string | Optional parent folder/directory ID |
URL Properties
| Property | Type | Description |
|---|---|---|
Url | string | Internal Omnium URL (set after upload) |
ExternalUrl | string | External URL to be downloaded and stored in Omnium |
File Properties
| Property | Type | Description |
|---|---|---|
FileName | string | File name including extension (e.g., product.jpg) |
ContentType | string | MIME type (e.g., image/jpeg, application/pdf) |
Length | long | File size in bytes |
Container | string | Storage container name |
InternalName | string | Internal reference name |
FileLoaderType | string | Type of file loader used |
Upload Control
| Property | Type | Description |
|---|---|---|
ForceUpload | bool? | Force upload external URL even if internal URL exists |
Base64EncodedContent | string | Optional base64-encoded file content for direct upload |
Metadata
| Property | Type | Description |
|---|---|---|
Properties | List<PropertyItem> | Custom key-value properties |
Created | DateTime | Creation timestamp |
Modified | DateTime | Last modification timestamp |
Key Concepts
AssetId
The AssetId is a unique identifier for each asset. If not provided during creation, a GUID is automatically generated:
URL Handling
Assets support two URL properties that work together:
| Scenario | ExternalUrl | Url | Behavior |
|---|---|---|---|
| New asset | Set | Empty | External URL is downloaded to Omnium storage, Url is set |
| Uploaded asset | Any | Set | Uses existing internal URL |
| Force re-upload | Set | Set | Re-downloads external URL if ForceUpload is true |
After processing:
IsMainImage
The IsMainImage flag designates the primary product image:
- Only one asset per product should have
IsMainImage: true - The main image URL is synchronized to
Product.MainImageUrl - Main image is typically shown in product listings and search results
Purpose
The Purpose property categorizes assets by their intended use:
| Purpose | Description |
|---|---|
hero | Large banner/hero image |
thumbnail | Small preview image |
gallery | Product gallery image |
detail | Detailed/zoom image |
lifestyle | Lifestyle/contextual image |
documentation | Product manuals, spec sheets |
Configure valid purpose values in tenant settings via AssetPurposeKeys.
SortOrder
Control asset display order with SortOrder:
Lower values appear first. Assets without SortOrder typically appear last.
Custom Properties
The Properties list allows storing arbitrary key-value metadata:
Use cases:
- Image credits and copyright
- Color/variant associations
- Campaign or season tagging
- Custom filtering criteria
Complete Example
Base64 Content Upload
For direct binary uploads without an external URL, use Base64EncodedContent:
Base64 encoding increases data size by approximately 33%. For large files, prefer using ExternalUrl or stream-based uploads.
