PHPackages                             tecnoready/imagine-service - 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. tecnoready/imagine-service

ActivePhp[Image &amp; Media](/categories/media)

tecnoready/imagine-service
==========================

Manage and optimize images with cache and filters using Imagine

036PHP

Since Feb 8Pushed 9y ago2 watchersCompare

[ Source](https://github.com/Tecnocreaciones/ImagineService)[ Packagist](https://packagist.org/packages/tecnoready/imagine-service)[ RSS](/packages/tecnoready-imagine-service/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

ImagineService
==============

[](#imagineservice)

Manage and optimize images with cache and filters using Imagine Inspired in

My filter and config definition
===============================

[](#my-filter-and-config-definition)

```
$filterConfig = new Tecnoready\ImagineService\Imagine\Filter\FilterConfiguration();

    $quality = 90;
    $pngCompressionLevel = 9;
    $filterConfig->set("thumb", [
        "filters" => [
            "thumbnail" => [
                "size" => array(200, 200),
            ],
        ],
        'quality' => $quality,
        'jpeg_quality' => $quality,
        'png_compression_level' => $pngCompressionLevel,

    ]);
    $filterConfig->set("medium", [
        "filters" => [
            "relative_resize" => [
                "heighten" => 400,
            ],
        ],
        'quality' => $quality,
        'jpeg_quality' => $quality,
        'png_compression_level' => $pngCompressionLevel,
    ]);
    $filterConfig->set("large", [
        "filters" => [
            "relative_resize" => [
                "heighten" => 800,
            ],
        ],
        'quality' => $quality,
        'jpeg_quality' => $quality,
        'png_compression_level' => $pngCompressionLevel,
    ]);

    $secret = "tokenToSingFiles";
    # Drive
    $drive = Tecnoready\ImagineService\Imagine\ImagineServiceBuilder::DRIVE_GD;

    $imagineServiceBuilder = new \Tecnoready\ImagineService\Imagine\ImagineServiceBuilder([
        "web_root_dir" => "./mi/app/public/",
        "cache_prefix" => 'media/cache',
    ]);
    # Assistant to build the service
    $imagineServiceBuilder
            ->withDrive($drive)
            ->withCacheManagerClass("\common\services\imagine\MyCacheManager")
            ->withFilterConfig($filterConfig)
            ->withSecret($secret)
            ;
    $imagineService = $imagineServiceBuilder->build();
```

Controller o resolve path example in index o path:
==================================================

[](#controller-o-resolve-path-example-in-index-o-path)

```
      $filter = $request->get("filter");
        $path = $request->get("path");

        $response = new Response();

        /**
         * \Tecnoready\ImagineService\Imagine\ImagineService
         * $imagineService
         **/

        $cacheManager = $imagineService->getCacheManager();
        $dataManager = $imagineService->getDataManager();
        $filterManager = $imagineService->getFilterManager();
        try {
            if (!$cacheManager->isStored($path, $filter)) {
                try {
                    $binary = $dataManager->find($filter, $path);
                } catch (\Tecnoready\ImagineService\Exception\Binary\Loader\NotLoadableException $e) {
                    if ($defaultImageUrl = $dataManager->getDefaultImageUrl($filter)) {
                        return $response->redirect($defaultImageUrl,302);
                    }

                    throw new \yii\web\NotFoundHttpException('Source image could not be found', 0,$e);
                }
                $cacheManager->store(
                    $filterManager->applyFilter($binary, $filter),
                    $path,
                    $filter
                );
            }

            return $response->redirect($cacheManager->resolve($path, $filter), 301);
        } catch (\RuntimeException $e) {
            throw new \RuntimeException(sprintf('Unable to create image for path "%s" and filter "%s". Message was "%s"', $path, $filter, $e->getMessage()), 0, $e);
        }

```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/bfce7e9b7caf3cdeea60e9584b09e8878afb8180115a23f37502f4a26eb5bfa9?d=identicon)[INHack20](/maintainers/INHack20)

---

Top Contributors

[![INHack20](https://avatars.githubusercontent.com/u/1240646?v=4)](https://github.com/INHack20 "INHack20 (23 commits)")

### Embed Badge

![Health badge](/badges/tecnoready-imagine-service/health.svg)

```
[![Health](https://phpackages.com/badges/tecnoready-imagine-service/health.svg)](https://phpackages.com/packages/tecnoready-imagine-service)
```

###  Alternatives

[milon/barcode

Barcode generator like Qr Code, PDF417, C39, C39+, C39E, C39E+, C93, S25, S25+, I25, I25+, C128, C128A, C128B, C128C, 2-Digits UPC-Based Extention, 5-Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI (Variation of Plessey code)

1.5k13.3M39](/packages/milon-barcode)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[goat1000/svggraph

Generates SVG graphs

132849.6k3](/packages/goat1000-svggraph)[cohensive/embed

Media Embed (for Laravel or as a standalone).

120370.4k](/packages/cohensive-embed)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

63991.3k4](/packages/netresearch-rte-ckeditor-image)[humanmade/tachyon-plugin

Rewrites WordPress image URLs to use Tachyon

87338.5k2](/packages/humanmade-tachyon-plugin)

PHPackages © 2026

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