schnti/autoresize

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

Kirby Autoresize Plugin

Installs: 4 132

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 7

Type:kirby-plugin

0.1.2 2019-03-24 21:40 UTC

This package is auto-updated.

Last update: 2023-08-25 08:17:42 UTC


README

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

Resizing a huge image

Commercial Usage

This plugin is free but if you use it in a commercial project please consider

Installation

Download

Download the files and place them inside site/plugins/autoresize.

Git Submodule

You can add the plugin as a Git submodule.

$ cd your/project/root
$ git submodule add https://github.com/schnti/kirby3-autoresize.git site/plugins/autoresize
$ git submodule update --init --recursive
$ git commit -am "Add Kirby Autoresize plugin"

Run these commands to update the plugin:

$ cd your/project/root
$ git submodule foreach git checkout master
$ git submodule foreach git pull
$ git commit -am "Update submodules"
$ git submodule update --init --recursive

Composer

composer require schnti/autoresize

Options

You can change the default 1500px width in /site/config/config.php:

return [
  'schnti.autoresize.max' => 1500,
  'schnti.autoresize.customConfig', [
      'imagekit.lazy' => false // e.g. for use with https://github.com/fabianmichael/kirby-imagekit
  ]
];

How to use it

Nothing required. Plugin is using the file.create:after and file.replace:after Hooks from Kirby