2017 © Pedro Peláez
 

craft-plugin twig-works-image

Twig image transforms for CraftCMS 3.

image

24hoursmedia-craftcms/twig-works-image

Twig image transforms for CraftCMS 3.

  • Tuesday, March 27, 2018
  • by 24hoursmedia-craftcms
  • Repository
  • 0 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

TwigWorksImage plugin for Craft CMS 3.x

For extra functionalities in this plugin we will request a small fee once Craft 3 GA is released., (*1)

A twig extension to apply transformations to image tags in blocks of html. Useful for content migrated for legacy systems., (*2)

  • Lightboxify images in HTML
  • Remove style and other tags from images
  • Apply classes and styles to images

See all available twig filters, (*3)

Requirements

This plugin requires Craft CMS 3.0.0-RC1 or later., (*4)

Installation

To install the plugin, follow these instructions., (*5)

  1. Open your terminal and go to your Craft project:, (*6)

    cd /path/to/project
  2. Then tell Composer to load the plugin:, (*7)

    composer require 24hoursmedia-craftcms/twig-works-image
  3. In the Control Panel, go to Settings → Plugins and click the “Install” button for TwigWorksImage., (*8)

TwigWorksImage Overview

  • Lightboxify images in an html document

Configuring TwigWorksImage

Currently there is no configuration., (*9)

Using TwigWorksImage

See all available twig filters and examples, (*10)

Lightboxify images in HTML, (*11)

Add data-toggle="lightbox" and a max width of 100% to images in an html document., (*12)

Example:, (*13)

{% set html = '<p>Image:<img src="...." width="200" style="border:1" /></p>' %}
{{ html | work_images_lightboxify | raw }}

This will: - remove most attributes from images in the html - embed the image in a link pointing to the full image - add an attribute data-toggle="lightbox" to the image, (*14)

(Note you will have to add your own lightbox script, for example in Bootstrap http://ashleydw.github.io/lightbox/), (*15)

The result:, (*16)

<p>Image:<img src="...." data-toggle="lightbox" style="max-width: 100%" /></p>

Brought to you by 24hoursmedia, (*17)

The Versions

27/03 2018

dev-master

9999999-dev

Twig image transforms for CraftCMS 3.

  Sources   Download

proprietary

The Requires

 

twig cms image craftcms craft-plugin craft twigworksimage

22/03 2018

1.0.0

1.0.0.0

twig image transforms..

  Sources   Download

proprietary

The Requires

 

cms craftcms craft-plugin craft twigworksimage