Kirby plugin to automatically rotate images.
If you are using the Kirby CLI you can install this plugin by running the following command in your shell from the root folder of your Kirby installation:
kirby plugin:install mightymango/autorotate
Download this archive, extract it and rename it to autorotate
. Copy the folder to your site/plugins
folder.
If you know your way around git, you can download this as a submodule:
git submodule add https://github.com/mightymango/autorotate/ site/plugins/autorotate
The plugin adds a hook so that any image is automatically processed when it is uploaded.
If you wish to disable the hook for any reason just add the following to your config.php file:
c::set('autorotate.enabled', false);
This plugin only autorotates images that have EXIF orientation flags, in both landscape and portrait orientation. Typically these are images that have been created on an iPhone etc.
If an image has been edited and it's orientation changed prior to uploading, this plugin will have no effect. Neither will it fix images that have been uploaded before the plugin was installed.
For this plugin to work it requires that Imagick has been compiled against ImageMagick version 6.3.0 or higher.
Check out recurser/exif-orientation-examples
Based on code from orrd101 at yahoo dot com .
Readme file based on template by Thiousi
MIT
- Checks if imageick is installed
- Small bug fix
- Initial release