Skip to content

A plugin for Kirby 2 CMS to shrink images on upload and replace to max size.

License

Notifications You must be signed in to change notification settings

schnti/kirby-image-shrink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kirby Image Upload Shrink Plugin

A plugin for Kirby 2 CMS to shrink images on upload and replace to max size.

Installation

Copy or link the image-shrink directory to site/plugins/ or use the Kirby CLI:

kirby plugin:install schnti/kirby-image-shrink

Config Variables

  • ka.image.shrink.maxDimension: Integer of max dimension (Default: 1000)
  • ka.image.shrink.customConfig: Additional config for $file->thumb()
c::set('ka.image.shrink.maxDimension', 2000);
c::set('ka.image.shrink.customConfig', array(
    'imagekit.lazy' => false // e.g. for use with https://github.com/fabianmichael/kirby-imagekit
));

How to use it

Nothing required. Plugin is using the panel.file.upload and panel.file.replace Hooks from Kirby

About

A plugin for Kirby 2 CMS to shrink images on upload and replace to max size.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages