Documentation

bootstrap.php

Resize assets to a maximum width after uploading and replace them with the resized ones

Copy this code snippet to /config/bootstrap.php.

You can set the max width in you config file with image_max_width: 1024 or use the default of 1920.

The upload process takes a while for large images, because

  1. the original image is uploaded,
  2. Colorthief picks the colors from the original file,
  3. SimpleImage resizes the file,
  4. and if you upload multiple images at once, steps 1-3 are multiplied

Related discussion: https://discourse.getcockpit.com/t/how-to-downsize-uploaded-image-assets-to-max-width-height/883

A modified version with maxHeight and group acl variables by @creatingo: https://discourse.getcockpit.com/t/how-to-downsize-uploaded-image-assets-to-max-width-height/883/5?u=raffaelj

Search results