mediaflow/mediaflow-craft

This package is abandoned and no longer maintained. No replacement package was suggested.

Mediaflow Craft plugin

Installs: 11

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 6

Forks: 1

Open Issues: 15

Language:CSS

Type:craft-plugin

v0.3.3 2015-01-16 10:15 UTC

This package is not auto-updated.

Last update: 2020-03-02 04:44:21 UTC


README

Craft CMS Keyteq Mediaflow plugin. Read more Visit Mediaflow!

Install

The easy and clean way

  1. composer require mediaflow/mediaflow-craft:~1.0

  2. Modify your public/index.php to autoload depdendencies by adding this as the second to last line:

    require __DIR__ . '/../vendor/autoload.php';

    This is only required once for all plugins using composer

The hard Crafty way

  1. Open the list of releases
  2. Download the zip file for the desired release
  3. Unpack the zip file to plugins/mediaflow/

Example of usage

Definition of crop sizes

You can define crop sizes in the Mediaflow custom fields

{"main":[400,500],"list-view":[500,300],"thumb":[100,100],"content-head":[800,316]}

In your template you can do the following:

<img src="{{ entry.yourImage.url('list-view') }}" />

Generating a media preview URL

<img src="{{entry.mediaflowField.url({width: 100,height: 100}) }}" />

Example with Foundation Interchange

{% set media = entry.mediaflowField %}
<img data-interchange="
    [{{ media.url({width:width,height:height,quality:90}) }}, (default)],
    [{{ media.url({width:width,height:height,quality:90}) }}, (large)]
">
<noscript>
    <img src="{{media.url({width:width,height:height,quality:90}) }}">
</noscript>

Using Picturefill.js