While using srcset, I am seeing thumbs that are being created, and include the thumb size in their filename such as 06-filename_550x.jpg
, but where file size is actually original size… like 6000 or 8000, and not 550, or 1280 or whatever the filename says. This results in large images being loaded:
I am seeing this with a lot of images, but not all of them.
This is localhost, and I am using the default driver, on kirby 3.7.2.1, recently updated, I was on 6.1.1 with the same problem.
In config I declare srcset like:
'thumbs' => [
'srcsets' => [
'home' => [375, 720, 960, 1280],
'works' => [375, 720, 960, 1280, 1600, 2300],
'shows' => [375, 550, 720, 960, 1280, 1600, 1800, 2300]
]
]
…then use it like:
<img
class="lazyload <?= $file->isLast($showFiles) ? 'last' : ''?>"
data-srcset="<?= $file->srcset("shows") ?>"
<?php if ($orientation == 'landscape') : ?>
data-sizes="
(max-width: 375px) 960px,
(max-width: 1440px) 1280px,
(max-width: 1920px) 1280px,
(max-width: 2560px) 1800px,
2300px"
<?php else : ?>
data-sizes="
(max-width: 375px) 375px,
(max-width: 1440px) 550px,
(max-width: 1920px) 550px,
(max-width: 2560px) 960px,
1280px"
<?php endif ?>
>
…any idea what may be happening ?
Thank you