Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

Latest commit

 

History

History
33 lines (22 loc) · 970 Bytes

readme.md

File metadata and controls

33 lines (22 loc) · 970 Bytes

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