Hi,
I have been taking a look at the image upload options that come with V4, it is going to be really useful to scale down images when uploaded (Uploader | Kirby CMS).
I have a standard set of thumbs I generate for images on a site, using this in my config.php
file:
'thumbs' => [
'srcsets' => [
'default' => [
'300w' => ['width' => 300],
'600w' => ['width' => 600],
'900w' => ['width' => 900],
'1200w' => ['width' => 1200],
'1800w' => ['width' => 1800],
'2300w' => ['width' => 2300],
'2880w' => ['width' => 2880],
],
'webp' => [
'300w' => ['width' => 300, 'format' => 'webp'],
'600w' => ['width' => 600, 'format' => 'webp'],
'900w' => ['width' => 900, 'format' => 'webp'],
'1200w' => ['width' => 1200, 'format' => 'webp'],
'1800w' => ['width' => 1800, 'format' => 'webp'],
'2300w' => ['width' => 2300, 'format' => 'webp'],
'2880w' => ['width' => 2880, 'format' => 'webp'],
],
]
],
Is it possible to also run this on image upload as well?
I ask because on a recent site for an artist, when they added loads of hi-res images to a page, the first page load (when thumbs are generated) caused the site to choke. Producing these on upload would be a great option if possible.