https://github.com/thisislawatts/kirby-picture
Adds picture support to kirby
https://github.com/thisislawatts/kirby-picture
Last synced: over 1 year ago
JSON representation
Adds picture support to kirby
- Host: GitHub
- URL: https://github.com/thisislawatts/kirby-picture
- Owner: thisislawatts
- Created: 2014-06-12T05:23:33.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2015-07-10T13:43:05.000Z (almost 11 years ago)
- Last Synced: 2025-01-26T08:12:53.125Z (over 1 year ago)
- Language: JavaScript
- Size: 195 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.mdown
Awesome Lists containing this project
README
# Picture Plugin
## What is it?
The picture plugin makes it easy to include smaller, resized versions of your images in your pages without adding extra code or uploading smaller versions yourself.
## Installation
Put the picture/ directory in your site/plugins folder. Add the plugins folder if it isn't there yet. Add a pictures folder to the root dir of your site and make sure it is writable. If you want to change the location of your picture cache folder read more about the available default settings further down.
Be sure to include the bundled version of picturefill.js in the head of your document.
## How to use it?
## Available settings
You can add the following config variables to your config file (site/config/config.php) to adjust the default settings of the thumb plugin:
```php
c::set('picture.cache.root', c::get('root') . '/pictures');
c::set('picture.cache.url', '/pictures');
c::set('picture.quality', 100);
c::set('picture.ajax', true);
c::set('picture.breakpoints', array(
array(
'width' => 1600,
'height' => 1600,
),
array(
'width' => 1280,
'height' => 1280,
),
array(
'width' => 800,
'height' => 800,
),
array(
'width' => 400,
'height' => 400,
) ) );
```
## Requirements
You must have GD Lib installed on your server for this plugin to work.
## Author
Luke Watts