kirby icon indicating copy to clipboard operation
kirby copied to clipboard

Files: don't run thumb processing if image smaller than the `create` dimensions

Open distantnative opened this issue 9 months ago • 2 comments

Original thread: https://forum.getkirby.com/t/uploaded-images-are-kept-the-same-dimensions-but-are-much-smaller-file-sizes/31488/6

I think this should be fixed inside the Darkroom libraries, e.g. somewhere here: https://github.com/getkirby/kirby/blob/main/src/Image/Darkroom/GdLib.php#L61

If no cropping and the current dimensions are already within the target dimensions, don't do anything.

distantnative avatar May 05 '24 15:05 distantnative

@distantnative I could not detect any compression during the upload in a default blueprint. With a file blueprint for images only, however, I did.

gbdesign2023 avatar May 05 '24 16:05 gbdesign2023

@gbdesign2023 I also get smaller file sizes with just any blueprint adding create options for width/height exceeding the original dimensions of the uploaded file.

distantnative avatar May 05 '24 18:05 distantnative