2017 © Pedro Peláez
 

cakephp-plugin adaptive-image-plugin

AdaptiveImages plugin for CakePHP 3

image

e2e4gu/adaptive-image-plugin

AdaptiveImages plugin for CakePHP 3

  • Tuesday, December 15, 2015
  • by e2e4gu
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

AdaptiveImages plugin for CakePHP

Requirements

PHP extension - Imagick, (*1)

sudo apt-get install php5-imagick

Installation

You can install this plugin into your CakePHP application using composer., (*2)

The recommended way to install composer packages is:, (*3)

composer require e2e4gu/adaptive-image-plugin

Add to /config/bootstrap.php, (*4)

Plugin::load('AdaptiveImages', ['autoload' => true, 'routes' => true]);

or, (*5)

Plugin::loadAll();

Add to main layout , (*6)

tag
<?= $this->Html->script('AdaptiveImages.client_screen') ?>

Helper includes in controller. Helper need for change src images path from original to cached., (*7)

public $helpers = ['AdaptiveImages.AdaptiveImg'];

Helper syntax. Your also can use Html helper`s options if you need it:, (*8)

echo $this->AdaptiveImg->image('yourimage.jpg', ['semanticType' => 'original']);

You can add semanticTypes and resolutionBreakpoints in:, (*9)

<your_local_project_dir>/vendor/e2e4gu/adaptive-image-plugin/config/adaptive_image_config.php
<your_local_project_dir>/config/adaptive_image_config.php

Config config syntax:, (*10)

<semanticType> => [
    <breakpoint-001> => [
         <scale-method> => [
                <param-001> => <value-001>
         ]
    ]
]

The Versions

15/12 2015

dev-master

9999999-dev

AdaptiveImages plugin for CakePHP 3

  Sources   Download

The Requires

 

The Development Requires