Thumbs not working for images with larger upload-size

Hi!

For a clientā€™s website Iā€™ve noticed that thumbs are only generated for images which are of an upload-size smaller than Ā±20mb.

this is what my thumbs config looks like:

'thumbs' => [
    'driver' => 'im',
    'bin' => '/usr/local/bin/convert',
    'interlace' => true,
    'srcsets' => [
        'default' => [
            '300w'  => ['width' => 300],
            '600w'  => ['width' => 600],
            '900w'  => ['width' => 900],
            '1200w' => ['width' => 1200],
            '1800w' => ['width' => 1800]
        ],
        'avif' => [
            '300w'  => ['width' => 300, 'format' => 'avif'],
            '600w'  => ['width' => 600, 'format' => 'avif'],
            '900w'  => ['width' => 900, 'format' => 'avif'],
            '1200w' => ['width' => 1200, 'format' => 'avif'],
            '1800w' => ['width' => 1800, 'format' => 'avif']
        ],
        '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']
        ],
    ]
]

In my network tab i see this:

Since the client didnā€™t like the slower page Iā€™ve manually replaced them with smaller images which triggered the thumbs to be smallerā€¦ so this made me wonder if this has to do with the upload file-size being to big for the thumbs to be generated? What am I missing here :sweat_smile:

This could well be the case. If the thumb generation failed (which depends on the image, the available system memoryā€¦), Kirby 3 fell back to the original image. Kirby 4 instead returns an error to make such issues quicker and easier to spot.

To avoid the generation errors all-together, you can resize the images on upload (but that again is available since Kirby 4).

Sorry, my faultā€¦I was not aware that the repo was on k4ā€¦ what a simple solution! :slight_smile: