User Asset Package
Cmash UserAsset — Feature Overview
Safe, print-aware handling of files your customers upload. Checked, inspected, previewed and converted into print-ready variants.
What Is Cmash UserAsset?
Cmash UserAsset stores files uploaded by end users (for example via form file fields) separately from your managed brand assets. Each upload is checked, inspected, given a preview and — where configured — converted into print-ready variants, so customer files are safe to use in production.

Key Features
Safe Uploads
- Strict upload check — the file type is detected from the file's actual content, not the name or browser-reported type. One shared rule applies in the admin, API and editor uploads.
- Clear, customer-friendly messages (English and German) — e.g. which types are accepted, and a hint to upload the print PDF instead of a screenshot. Supported labels include JPEG, PNG, GIF, SVG, TIFF, BMP, WebP, HEIC, PSD and PDF (exact list depends on the installed converters).
Inspection and Previews
- Automatic inspection — size, dimensions, colour space, DPI and PDF page count are read and shown.
- Preview thumbnails — generated per file type.
- Colour profile handling — embedded profiles are used; missing ones get a sensible default for screen images, or the user is asked to choose one when it can't be safely assumed (including printing condition for PDFs). Confirming triggers the print files.
Print Variants
- Variants — print variants are generated for the asset variant types selected by an operator (or all marked auto-generate).
- Originals kept — originals are always kept even if a conversion fails, and failures are reported clearly.
Admin and Housekeeping
- Admin — list, view, edit and create uploads with owner, alt text, active flag, preview, variant cards and processing status.
php artisan cmash:reprocess-user-assets [--missing-profile] [--user=ID] [--dry-run]— re-inspect and rebuild variants after a pipeline change.php artisan cmash:purge-user-assets {user} [--force]— delete all uploads of one user with variants and files (e.g. privacy requests).
Integrations & API
REST API (Sanctum): /user-assets — list, create, show, update, delete.
Permissions & Dependencies
- Requires PHP ^8.3, Filament ^5, Sanctum and the CMAsh core package cmash (asset converters, colour profiles, variant types and the setting
user_asset_variant_type_idscome from the platform core). - Used by cmash-typst for rendering user images.
- No package-specific roles or permissions.
Configuration
No config file and no environment variables in this package. Behaviour is controlled by platform settings:
| Setting | Meaning |
|---|---|
user_asset_variant_type_ids |
Which variant types are generated for uploads; empty = all types marked auto-generate. |
Translatable messages are in lang/en and lang/de (namespace cmash-userasset).
Use Cases
- Personalised print products — customers upload logos or photos that become print-ready files.
- Quality gate — reject wrong file types with a helpful hint before they reach production.
- Privacy requests — purge all uploads of one user in a single command.
- Pipeline changes — reprocess existing uploads after converter or profile updates.
Cmash UserAsset: customer uploads you can print with confidence.