PHPackages                             creode/laravel-assets - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. creode/laravel-assets

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

creode/laravel-assets
=====================

Base module which is used for the DAM to create assets.

2.1.0(1y ago)0140[4 PRs](https://github.com/creode-modules/laravel-assets/pulls)1MITPHPPHP ^8.1CI passing

Since Oct 20Pushed 5mo agoCompare

[ Source](https://github.com/creode-modules/laravel-assets)[ Packagist](https://packagist.org/packages/creode/laravel-assets)[ Docs](https://github.com/creode-modules/laravel-assets)[ RSS](/packages/creode-laravel-assets/feed)WikiDiscussions 2.x Synced yesterday

READMEChangelog (10)Dependencies (11)Versions (28)Used By (1)

Base module which is used for the DAM to create assets.
=======================================================

[](#base-module-which-is-used-for-the-dam-to-create-assets)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d0a148d802131a30a948bdc26e4c374df8275d94f8f4437ac452988e09a3b848/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6372656f64652f6c61726176656c2d6173736574732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/creode/laravel-assets)[![GitHub Tests Action Status](https://camo.githubusercontent.com/9b99cfde32b5816b28dc58a9d260d0dedeec06afe48fbf789fe5f1955a54febe/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6372656f64652d6d6f64756c65732f6c61726176656c2d6173736574732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/creode-modules/laravel-assets/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/b0d87b05a2318b9a1e5f7d40db999b057821cd1b21e4baf1a2fb5c1ae9e4ee0c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6372656f64652d6d6f64756c65732f6c61726176656c2d6173736574732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/creode-modules/laravel-assets/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/0e540ba560b5ed4c31885b6097a544b83cadbb75844997e08c94b586ef4d36ce/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6372656f64652f6c61726176656c2d6173736574732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/creode/laravel-assets)

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require creode/laravel-assets
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="assets-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="assets-config"
```

This is the contents of the published config file:

```
return [

    /*
    |--------------------------------------------------------------------------
    | Disk
    |--------------------------------------------------------------------------
    |
    | This value is the name of the disk where assets will be stored. This can
    | be any disk that you have configured in your filesystems.php config file.
    |
    */

    'disk' => env('FILESYSTEM_DISK', 'public'),
];
```

Usage
-----

[](#usage)

```
$asset = new Creode\LaravelAssets\Models\Asset;

// You can get the asset location from disk using a path.
$asset->path;

// You can get the url property of the asset.
$asset->url;
```

### Custom Thumbnail Generation

[](#custom-thumbnail-generation)

The ThumbnailGenerator allows for the registration of custom thumbnail generators to handle different asset types. This extensibility ensures that your application can easily adapt to new file types or specific thumbnail generation requirements.

#### Example

[](#example)

Here's a complete example of registering and using a custom thumbnail generator:

```
namespace App\Generators;

use Creode\LaravelAssets\Generators\PDFThumbnailGenerator;

class EPSThumbnailGenerator implements ThumbnailGeneratorInterface
{
    /**
     * Generates a thumbnail url for an asset.
     */
    public function generateThumbnailUrl(Asset $asset): ?string {
        // Custom logic to generate a thumbnail for an EPS file.
    }

    /**
     * Gets the type of output this generator produces.
     */
    public function getOutputType(): string {
        return 'image'; // typically 'image' or 'icon'.
    }
}
```

```
// AppServiceProvider.php

namespace App\Providers;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    public function boot()
    {
        // Add an EPS thumbnail generator.
        $generator = resolve('assets.thumbnail.factory');

        $generator->addGenerator('image/x-eps', function () {
            return new \App\Generators\EPSThumbnailGenerator();
        });
    }
}
```

By integrating the custom generator as shown above, your application will now respond to the needs of different asset types and thumbnail generation strategies, while maintaining a clean and modular architecture.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Creode](https://github.com/creode)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance59

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 68.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~30 days

Recently: every ~12 days

Total

20

Last Release

409d ago

Major Versions

1.x-dev → 2.0.02025-03-31

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8133041?v=4)[Creode](/maintainers/creode)[@creode](https://github.com/creode)

---

Top Contributors

[![jaymeh](https://avatars.githubusercontent.com/u/18261676?v=4)](https://github.com/jaymeh "jaymeh (54 commits)")[![creode-dev](https://avatars.githubusercontent.com/u/19706903?v=4)](https://github.com/creode-dev "creode-dev (12 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![liam-spedding](https://avatars.githubusercontent.com/u/111750536?v=4)](https://github.com/liam-spedding "liam-spedding (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravellaravel assetscreode

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/creode-laravel-assets/health.svg)

```
[![Health](https://phpackages.com/badges/creode-laravel-assets/health.svg)](https://phpackages.com/packages/creode-laravel-assets)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.6k3](/packages/defstudio-telegraph)[nativephp/mobile

NativePHP for Mobile

1.1k75.1k91](/packages/nativephp-mobile)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

44855.7k](/packages/harris21-laravel-fuse)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
