Exception thrown during ThumbHash encode

Hi @tobimori, I was wondering if there is a simple way to debug the exception:

2000x1443 doesn't fit in 100x100 that is being thrown in relation to this line:

throw new \Exception("[Sw]xf$h} doesn't fit in 100x100");

I have made sure that GD is installed on server.

Thanks a lot,
Kiah

Hi! It seems like generating the thumb that’s used to generate the placeholder failed. In this case, make sure that generating a thumb for the image using the usual Kirby thumb method works.

Hey @tobimori, thanks for getting back. I thought it may be something like that as well, but I have tested using the usual Kirby thumb method and it works.

My code for this part is:

<?php foreach ($files as $file): ?>
<img
  src="<?= $file->thumbhashUri() ?>"
>
<?php endif ?>

My config is:

'thumbs' => [
  'driver' => 'im',
  'bin' => '/usr/bin/convert',
]

gd is also installed on the server.

Kirby automatically returns the original image if the thumb couldn’t be generated. Are you sure the $file->thumb() image has the correct size (that you requested in the thumb)?