volldigital/autosizeimages

Statamic 3 addon to automagically resize images

1.0.2 2021-11-22 14:01 UTC

This package is auto-updated.

Last update: 2024-05-22 20:02:35 UTC


README

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: 1200px

The 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.