diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fbb9c4..9543dac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,10 @@ Notable changes to this project will be documented in this file. -## [2.0.2] +## [2.1.0] -- Write modified file back properly +- Write modified file properly +- Update configs ## [2.0.1] diff --git a/docs/en/Configuration.md b/docs/en/Configuration.md index ef49098..bbea431 100644 --- a/docs/en/Configuration.md +++ b/docs/en/Configuration.md @@ -4,11 +4,11 @@ To set your own configuration, simply create a `mysite/_config/scaled-uploads.ym ```yaml Axllent\ScaledUploads\ScaledUploads: - max-width: 960 # Maximum width - default 960 - max-height: 800 # Maximum height - default 800 - auto-rotate: true # Automatically rotate images that rely on exif information for rotation - default true + max_width: 960 # Maximum width - default 960 + max_height: 800 # Maximum height - default 800 + auto_rotate: true # Automatically rotate images that rely on exif information for rotation - default true bypass: false # Bypass (skip) this plugin when uploading - default false - force-resampling: true # Force re-saving the image even if it is smaller - default false + force_resampling: true # Force re-saving the image even if it is smaller - default false ``` If you require larger images for a particular DataObject (such as full-width banner), but wish to keep all other uploads scaled @@ -22,8 +22,8 @@ class BannerImage extends Image { public function onBeforeWrite() { - Config::inst()->update('Axllent\\ScaledUploads\\ScaledUploads', 'max-width', 1600); - Config::inst()->update('Axllent\\ScaledUploads\\ScaledUploads', 'max-height', 1600); + Config::inst()->update('Axllent\\ScaledUploads\\ScaledUploads', 'max_width', 1600); + Config::inst()->update('Axllent\\ScaledUploads\\ScaledUploads', 'max_height', 1600); parent::onBeforeWrite(); } }