---
title: Assets
description: 'Handling and manipulating Storyblok asset fields in Laravel applications.'
url: 'https://ls.sirric.co.uk/docs/3.0/assets'
version: '3.0'
last_updated: '2026-11-12'
---

> Docs index: https://ls.sirric.co.uk/docs/3.0/llms.txt · MCP: https://ls.sirric.co.uk/docs/mcp · Skill: https://ls.sirric.co.uk/docs/skill.md

# Assets

Assets are a special type of Field with additional functionality. Where possible we try to detect the type of file uploaded and return an appropriate Field. `Image` classes are returned when the file has one of the supported image extensions (by default: `.jpg`, `.jpeg`, `.png`, `.gif`, `.webp`, `.jfif`, `.heic`, `.avif`). See the [Image documentation](https://ls.sirric.co.uk/docs/3.0/images.md) for more.

## Checking for a file

To check if a file has been uploaded in Storyblok call `hasFile()` on the Asset.

```php
$myAsset->hasFile();
```

> [!NOTE]
> When using multi-asset fields we only receive a URL from Storyblok, so the Asset/Image fields are less complete.

## Custom asset domains

Storyblok allows you to serve assets from their platform using a custom domain. You will need to define two configuration values in your `storyblok` config file:

```php
[
    // rest of configuration
    'asset_domain' => 'custom.asset.domain',
    'image_service_domain' => 'custom.imageservice.domain'
]
```

The configuration to customise both domains is needed because:

- Storyblok links a CloudFront distribution directly to the S3 bucket, bypassing the image service.
- Non-image assets cannot pass through the image service, so you cannot pass all asset requests through img2.storyblok.com

> [!NOTE]
> [See Storyblok’s documentation on setting up the custom asset domains](https://www.storyblok.com/docs/custom-assets-domain).

Thank you to [Brent Mullen](https://github.com/brentmullen) for this feature!
