Skip to main content

Assets

Assets are media files inside the heycreo platform (images, videos, audio, SVG) that can be used in templates and designs. They are stored in the organization's asset library / DAM and can be organized using collections and tags for easy discovery and reuse.

How it works: Assets are stored in the organization's asset library and referenced by their ID in templates and designs. When an asset is used in an image control, the asset ID is stored in the control value. The platform handles loading and rendering assets appropriately based on their type and metadata.

Asset Types

The platform supports several asset types:

  • Image: Static images (PNG, JPEG, WebP, etc.)
  • Video: Video files (MP4, WebM, etc.)
  • Audio: Audio files (MP3, WAV, etc.)
  • SVG: Scalable vector graphics

The Asset Object

The asset object structure:

interface Asset {
id: string; // UUID
name: string; // Asset name
description?: string; // Asset description
assetUrl: string; // URL to the asset file
previewUrl?: string; // URL to preview/thumbnail
thumbnailUrl?: string; // Video thumbnail URL
assetType: 'image' | 'audio' | 'video' | 'svg';

// Status
status: 'pending' | 'processing' | 'completed' | 'failed';

// Metadata
visualDescription?: string; // AI-generated visual description
isIndexedByAi: boolean; // Whether asset is indexed for AI search

// File metadata
fileSize?: number; // File size in bytes
mimeType?: string; // MIME type (e.g., "image/png")
fileExtension?: string; // File extension (e.g., "png")
originalFilename?: string; // Original filename

// Image metadata
width?: number; // Image width in pixels
height?: number; // Image height in pixels
aspectRatio?: number; // Width/height ratio

// Video/Audio metadata
duration?: number; // Duration in milliseconds
bitrate?: number; // Bitrate in kbps
fps?: number; // Frames per second (video)
videoCodec?: string; // Video codec
audioCodec?: string; // Audio codec
containerFormat?: string; // Container format

// Video proxy (for web preview)
assetProxyUrl?: string; // Compressed WebM for web preview
hasProxy?: boolean; // Whether proxy exists
needsProxy?: boolean; // Whether proxy needs to be generated
proxyProgressPercentage?: number; // Proxy generation progress (0-100)

// Organization
organizationId: string; // Organization ID
creatorId?: string; // User who created/uploaded the asset

// Organization
collectionId?: string; // Collection this asset belongs to
tags?: Tag[]; // Tags associated with this asset

// Relations
originalAssetId?: string; // ID of original asset (for derived assets)
insertProducts?: Array<{ // Related insert products
id: string;
name: string;
}>;

createdAt: Date;
updatedAt: Date;
}

Collections and Tags

Assets can be organized using collections and tags. Collections group assets together, while tags provide flexible categorization. Assets can belong to one collection and have multiple tags. These organizational features are used for filtering and searching assets in the asset library.

Using Assets in Templates and Designs

Assets are used in templates and designs through image controls. When an asset is assigned to an image control, the asset ID is stored in the control value, and the platform renders the asset in the final export.

Asset References

In control values, assets are referenced by their ID:

{
"product-image-control": {
"valueType": "image",
"value": {
"source": {
"assetId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
},
"cropData": {
"size-id": {
"rect": { "x": 0, "y": 0, "w": 100, "h": 100 },
"rotation": 0,
"zoom": 1
}
}
}
}
}

AI Indexing

Assets can be indexed by AI to enable intelligent search. When AI indexing is enabled, the platform generates visual descriptions of the asset's content, which can be used for semantic search and content-based discovery.

Video Assets

Video assets have additional metadata and processing:

  • Proxy generation: Compressed WebM proxies are generated for fast web preview
  • Thumbnail generation: Thumbnails are automatically generated
  • Video metadata: Codec information, duration, bitrate, and frame rate

Asset Origins

Assets can come from different sources:

  • User upload: Directly uploaded by users
  • Template import: Included when importing templates (.heycreo files)
  • AI generation: Generated by AI services

See also