Hi,
I am having an odd issue with thumb generation on my Kirby site. I have set up the thumbs in config as follows:
'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'],
],
]
],
Which I am using like this in my templates:
<picture>
<source
srcset="<?= $image->srcset('webp') ?>"
sizes="100vw"
type="image/webp"
>
<img
alt="<?= $image->alt() ?>"
src="<?= $image->resize(1200)->url() ?>"
srcset="<?= $image->srcset() ?>"
loading="lazy"
sizes="100vw"
width="<?= $image->resize(1200)->width() ?>"
height="<?= $image->resize(1200)->height() ?>"
>
</picture>
My issue is, while all the images are being generated with the correct resized suffix (e.g. -660x
) but only some are being resized. It seems to be the larger widths that are not being created, but just the original file reproduced.
I have confirmed with the hosts that GD is installed and running, which makes sense as some of the images are being resized.
Has anyone hit this issue before? I am not sure how to tackle it as it is sometimes working and sometimes not