Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/volldigital/autosizeimages
This statamic 3 addon provides you with the ability to get automagically resized images upon uploading.
https://github.com/volldigital/autosizeimages
Last synced: about 2 months ago
JSON representation
This statamic 3 addon provides you with the ability to get automagically resized images upon uploading.
- Host: GitHub
- URL: https://github.com/volldigital/autosizeimages
- Owner: volldigital
- Created: 2021-08-20T12:37:09.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-11-22T14:03:38.000Z (about 3 years ago)
- Last Synced: 2024-04-11T01:00:51.708Z (9 months ago)
- Language: PHP
- Size: 331 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Autosize Images
This statamic 3 addon provides you with the ability to get automagically resized images upon uploading.
## Get started
### Installation
Use the statamic marketplace to install the addon.
For evaluation purposes you may install the plugin directly via
```composer require volldigital/autosizeimages```
### Publish the config
```php artisan vendor:publish --provider="VOLLdigital\Autosizeimages\ServiceProvider"```You may modify the published config and add as many formats as you need.
The config is provided in YAML format.Example:
```
size_configs:
-
width: 480
-
width: 640
-
width: 900
-
width: 1200
-
width: 400
height: 400
```The following resized images will be created while keeping the aspect ratio
- Width: 480px
- Width: 640px
- Width: 900px
- Width: 1200pxThe following resized images will be created while _NOT_ keeping the aspect ratio
- Width: 400px, Height: 400px### Regenerate all resized images
You can use the console command ```php artisan autosizeimages:refresh``` to delete and recreate all resized images.
You should use this with caution though, especially if you made changes to the config in between image generations.
You may need to manually link them to all entries again.