Square thumbnails are sexy. And functional. A square thumbnail stacks cleanly alongside its square siblings.
I've written a patch that allows image.module to generate square thumbnails from unsquare originals. It does this by scaling the original image down to thumbnail size and then cropping it into a square. It handles both landscape and portrait oriented images and uses the default thumbnail image size that already exists in image.module. This patch adds a configuration option to configure the region of the image to be used when cropping rectangular images into squares (the left/top of the image, the middle of the image, or the right/bottom of the image).
There are still some features that need to be added (such as editing the thumbnail when previewing an image upload). I can add those if there is sufficient interest.
| Comment | File | Size | Author |
|---|---|---|---|
| image_square_thumbs.patch | 7.12 KB | superhappylucky |
Comments
Comment #1
Anonymous (not verified) commentedHi ! Is there any possibility to use this patch with 4.6.6 ?
How to patch the module please ?
Thanks ;)
Comment #2
Stefan Nagtegaal commentedThere is no need to patch image.module to do this and IMO this should be implemented as a contrib module. Have a look at how image_exact.module does this..
Marking as "won't fix".
Comment #3
Mirrorball commentedThis feature would work better if it were included in the image.module because when the thumbnail size settings are changed, the thumbnails are not squared. So please fix. :)
Comment #4
piotrdesign commentedWhen will you guys include this feature in the image module?