quazardous/imagestack-bundle

ImageStack Bundle

Installs: 110

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

Type:symfony-bundle

1.3.6 2019-03-20 21:18 UTC

This package is auto-updated.

Last update: 2024-11-24 01:32:44 UTC


README

A PHP image serving framework.

The main goal is to provide a robust framework to create an "on the fly" image thumbnailer generator similar to imagecache / image style in Drupal.

You can also use it to build a singlepoint multipurpose proxy server on top of a "complex" / legacy(ish) / not-yet-migrated images structure.

Here is a Symfony 4 bundle for ImageStack.

Installation

composer require quazardous/imagestack-bundle

Config

see Resources/doc/index.rst

Usage

The above config will let you have a ./images/ private folder hold original images and serves them from images/....

It defines some thumbnail rules and activates images optimizers.

Say you need to display ./images/foo/cool_image.jpg with thumbnail style.

Just hit images/style/thumb/foo/cool_image.jpg and voilĂ  !

Behind the curtain, Imagestack we generate and optimize images/style/thumb/foo/cool_image.jpg, store it in ./public/images/style/thumb/foo/cool_image.jpg and serve it to your browser.

So next HTTP call will be statically serverd.

Advanced usage

With Imagestack you can stack components like bricks.

Say you need to serve images from your new CMS but also images from old stuff you have imported "as it" with heteroclite image sources...

You can build a stack with a sequential image backend wich will try to fetch given path from different backends including "legacy" HTTP Proxy backends.

You can of course internally rewrite the path with "kitchen rules" to fetch the legacy images.

Twig

Imagestack has a Twig filter and function imagestack.

...
<img src="{{ 'foo/cool_image.jpg'|imagestack('style/thumb') }}"/>
...

Changelog

  • 1.3: hello Github
  • 1.0: hello SF4