Download the PHP package getherbie/plugin-imagine without Composer

On this page you can find all versions of the php package getherbie/plugin-imagine. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package plugin-imagine

Note: Since version 2.x this plugin is part of Herbie, see https://github.com/getherbie/herbie/tree/2.x/plugins/imagine.


Herbie Imagine Plugin

Imagine ist ein Herbie Plugin, das die gleichnamige OOP-Library zur Bildbearbeitung Imagine in deine Website einbindet.

Dank Imagine können Bilder direkt bearbeitet und mit vorgefertigten Filtern und Effekten versehen werden. Imagine ist eine objektorientierte Bibliothek zur Bildmanipulation, die auf einem durchdachten Design aufbaut und dabei die aktuellsten Best-Practices nutzt.

Installation

Das Plugin installierst du via Composer.

$ composer require getherbie/plugin-imagine

Danach aktivierst du das Plugin in der Konfigurationsdatei.

plugins:
    enable:
        - imagine

Konfiguration

Unter plugins.config.imagine stehen dir die folgenden Optionen zur Verfügung:

# template path to twig template
template: @plugin/disqus/templates/disqus.twig

# enable shortcode
shortcode: true

# enable twig function and filter    
twig: false

# filter set definition
filter_sets: 
   ...

Filter konfigurieren

Um Imagine in Herbie nutzen zu können, muss für jedes Projekt die Konfiguration angepasst werden. Dabei können ein oder mehrere Filtersätze mit je einem oder mehreren Filtern definiert werden. Im folgenden Konfigurations-Beispiel haben wir zwei einfache Filter zum Skalieren und Ausschneiden eines Bildes erstellt.

# define filter sets for use in shortcode
filter_sets:

    # define resize filter
    resize:                         
        filters:
            thumbnail:
                size: [280, 280]
                mode: inset

    # define drop filter                    
    crop:
        filters:
            crop:
                start: [0, 0]
                size: [560, 560]

Mit dieser Konfiguration stehen dir zwei Imagine-Filter resize und crop zur Verfügung, die du in deinen Seiteninhalten auf Bilder anwenden kannst.

Mit dem folgenden Code wird ein Bild auf eine maximale Grösse von 280 x 280 Pixel skaliert:

[imagine mein-bild.jpg filter="resize"]

Und mit dem folgenden Code ein Bild mit der Grösse 560 x 560 Pixel ausgeschnitten:

[imagine mein-bild.jpg filter="crop"]

Mit dem Aktivieren von Twig kannst du Imagine sowohl als Funkion als auch Filter in deinen Layoutateien nutzen:

# Twig-Funktion
{{ imagine(path="mein-bild.jpg", filter="bsp1") }}

# Twig-Filter
{{ "mein-bild.jpg" | imagine("bsp1") }}    

Parameter

Demo

https://herbie.tebe.ch/dokumentation/plugins/imagine


All versions of plugin-imagine with dependencies

PHP Build Version
Package Version
Requires getherbie/herbie Version ^1.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package getherbie/plugin-imagine contains the following files

Loading the files please wait ....