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.

CommentFileSizeAuthor
image_square_thumbs.patch7.12 KBsuperhappylucky

Comments

Anonymous’s picture

Component: Code » gd toolkit

Hi ! Is there any possibility to use this patch with 4.6.6 ?
How to patch the module please ?
Thanks ;)

Stefan Nagtegaal’s picture

Status: Needs review » Closed (won't fix)

There 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".

Mirrorball’s picture

This 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. :)

piotrdesign’s picture

When will you guys include this feature in the image module?