PHPackages                             camelot/image-asset - 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. [Image &amp; Media](/categories/media)
4. /
5. camelot/image-asset

ActiveSymfony-bundle[Image &amp; Media](/categories/media)

camelot/image-asset
===================

Image management library &amp; bundle based on GD to handle image thumbnails

1.0.x-dev(6y ago)2301MITPHPPHP ^7.1

Since Aug 8Pushed 6y ago1 watchersCompare

[ Source](https://github.com/CamelotProject/image-asset)[ Packagist](https://packagist.org/packages/camelot/image-asset)[ RSS](/packages/camelot-image-asset/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (22)Versions (3)Used By (0)

Camelot Image Asset
===================

[](#camelot-image-asset)

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

[](#installation)

### Applications that use Symfony Flex

[](#applications-that-use-symfony-flex)

Open a command console, enter your project directory and execute:

```
$ composer require camelot/image-asset
```

### Applications that don't use Symfony Flex

[](#applications-that-dont-use-symfony-flex)

#### Step 1: Download the Bundle

[](#step-1-download-the-bundle)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
$ composer require camelot/image-asset
```

This command requires you to have Composer installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

#### Step 2: Enable the Bundle

[](#step-2-enable-the-bundle)

Then, enable the bundle by adding it to the list of registered bundles in the `config/bundles.php` file of your project:

```
// config/bundles.php

return [
    // ...
    Camelot\ImageAsset\Bridge\Symfony\CamelotImageAssetBundle::class => ['all' => true],
];
```

Configuration
-------------

[](#configuration)

### Default configuration

[](#default-configuration)

```
# config/packages/camelot_image_asset.yaml
camelot_image_asset:
    image_dirs:
        - '%kernel.project_dir%/public/images'
    static_path: '%kernel.project_dir%/public/thumbs'
    routing:
        mount_point: /thumbs
        image:
            controller: Camelot\ImageAsset\Controller\ImageController
            path: '/{width}x{height}/{action}/{file}'
        image_alias:
            controller: Camelot\ImageAsset\Controller\ImageAliasController
            path: '/{alias}/{file}'
    default_image:
        path: image-default.png
        filesystem: camelot.image.filesystem.bundle
    default_image_size:
        width: 1024
        height: 768
    error_image:
        path: image-error.png
        filesystem: camelot.image.filesystem.bundle
    cache_time: null
    limit_upscaling: true
    only_aliases: false
    aliases: ~
```

### Aliases

[](#aliases)

```
# config/packages/camelot_image_asset.yaml
camelot_image_asset:
    # ...

    aliases:
        my_alias:
            image_size:
                width: 1024
                height: 768
            action: ~ # One of "border"; "crop"; "fit"; "resize"
        other_alias:
            image_size:
                width:  1900
                height: 1200
            action: ~ # One of "border"; "crop"; "fit"; "resize"
```

### Routing

[](#routing)

```
# config/routes/camelot_image_asset.yaml
camelot_image_asset:
    resource: .
    type: image_asset
    prefix: /
```

Usage
-----

[](#usage)

### Twig

[](#twig)

```
    {% set uri = '/images/image.png' %}

    {# This will be cropped to the default width & height #}

    {# Same, but path resolved by Symfony's asset() Twig function #}
    {% set package_name = 'my_symfony_asset_package_name' %} # See config/packages/assets.yaml

```

NGINX Optimisation
------------------

[](#nginx-optimisation)

```
location ~* /thumbs/(.*)$ {
    try_files $uri $uri/ /index.php?$query_string;
}

location ~* ^.+\.(?:gif|jpe?g|jpeg|jpg|png|svg|svgz)$ {
    access_log          off;
    log_not_found       off;
    expires             max;
    add_header          Access-Control-Allow-Origin "*";
    add_header          Cache-Control "public, mustrevalidate, proxy-revalidate";
    add_header          Pragma public;
}
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Unknown

Total

1

Last Release

2421d ago

### Community

Maintainers

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

---

Top Contributors

[![rossriley](https://avatars.githubusercontent.com/u/5082?v=4)](https://github.com/rossriley "rossriley (109 commits)")[![GwendolenLynch](https://avatars.githubusercontent.com/u/1427081?v=4)](https://github.com/GwendolenLynch "GwendolenLynch (55 commits)")[![rarila](https://avatars.githubusercontent.com/u/5936174?v=4)](https://github.com/rarila "rarila (36 commits)")[![bobdenotter](https://avatars.githubusercontent.com/u/1833361?v=4)](https://github.com/bobdenotter "bobdenotter (15 commits)")[![Pinpickle](https://avatars.githubusercontent.com/u/3238878?v=4)](https://github.com/Pinpickle "Pinpickle (14 commits)")[![CarsonF](https://avatars.githubusercontent.com/u/932566?v=4)](https://github.com/CarsonF "CarsonF (12 commits)")[![ToBe998](https://avatars.githubusercontent.com/u/12497310?v=4)](https://github.com/ToBe998 "ToBe998 (3 commits)")[![SahAssar](https://avatars.githubusercontent.com/u/2924501?v=4)](https://github.com/SahAssar "SahAssar (1 commits)")[![ntomka](https://avatars.githubusercontent.com/u/2313363?v=4)](https://github.com/ntomka "ntomka (1 commits)")[![Yceforp](https://avatars.githubusercontent.com/u/655295?v=4)](https://github.com/Yceforp "Yceforp (1 commits)")[![GDmac](https://avatars.githubusercontent.com/u/156334?v=4)](https://github.com/GDmac "GDmac (1 commits)")[![rixbeck](https://avatars.githubusercontent.com/u/761149?v=4)](https://github.com/rixbeck "rixbeck (1 commits)")

---

Tags

assetsgdimagesjpgpngsvgsymfony-bundlethumbnailswebp

###  Code Quality

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/camelot-image-asset/health.svg)

```
[![Health](https://phpackages.com/badges/camelot-image-asset/health.svg)](https://phpackages.com/packages/camelot-image-asset)
```

###  Alternatives

[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[symfony/framework-bundle

Provides a tight integration between Symfony components and the Symfony full-stack framework

3.6k246.0M11.1k](/packages/symfony-framework-bundle)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19664.8M1.6k](/packages/drupal-core)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6941.5M398](/packages/drupal-core-recommended)[contao/core-bundle

Contao Open Source CMS

1231.6M2.7k](/packages/contao-core-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M526](/packages/shopware-core)

PHPackages © 2026

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