How to show thumbnails of large images in the panel


my problem is, that my clients upload their images to the kirby panel as they are. So images from DSLR are bigger than 2000px. In that case the thumbnails are not shown in the panel. There is only a black box with a string that tells me the type of the image.

Can i force to show thumbnails in the panel?

Thanks for your answers.

I think there is no officially supported way to do this. But you could change the maximum dimensions (currently 2000px width and height) in panel/app/views/files/index.php in line 32:

<?php if(in_array($file->extension(), array('jpg', 'gif', 'png')) and $file->width() < 2000 and $file->height() < 2000): ?>

Ok, then i have to modify the core. @bastianallgeier : this would be a gread feature for the next kirby release.

c::set(โ€˜panel.thumb.generation.maxdimensionโ€™, 5000);

1 Like

Just for reference, this calculation is done in panel/app/views/files/show.php (line 23) for previewing images as well:

<?php if(in_array($f->extension(), array('jpg', 'jpeg', 'gif', 'png')) and $f->width() < 2000 and $f->height() < 2000): ?>

Just out of curiosity Iโ€™d like to know how the thumb() function handles fallbacks: Imagine the image calculation fails due to PHP not having enough memory:
I agree on the image not showing in the overview then, but on clicking โ€œshowโ€ it could still fall back to the original image, right?

Has this moved somehow?

I have biggest images and need panel thumbs :((