Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba

ImageGallery - why are thumbnails cropped?

Go to End

3 Posts   1267 Views


Community Member, 117 Posts

25 June 2009 at 2:23am

Edited: 25/06/2009 2:23am

Why are thumbnails first having about 10px or so cropped on all sides THEN resized to the thumbnail dimensions specified?

I've searched through the code but just can't seem to find where this extra is being removed from the edges

A pointer to the code where I can change this would be appreaciated



Forum Moderator, 4102 Posts

25 June 2009 at 2:40am

Right now the ImageGallery supports only square thumbnails. I'll be adding in a height attribute for the thumbnails very soon, but understand they will always have to be a predictable height, otherwise the CSS will break, not to mention it looks awkward. So there will always have to be some amount of cropping for dimensions that do not conform to the aspect ratio of the original photo.


Community Member, 117 Posts

25 June 2009 at 2:50am

Edited: 25/06/2009 2:51am

Thanks for reply.

I looked into imaging code a little more after posting this and saw mention of the need to crop images in order to maintain aspect ratio. The issue is that I've been comparing thumbs generated here with thumbs generated manually on an old site I'm wanting to convert to SS. The issue with many thumbs is that the cropping is of course not taking into account the content, so where an image (with larger height then width) had some text at the top, the auto-cropping is removing part of the bottom and top of the image and so cropping off the readable text. I guess no auto-resizing code can ever really factor in the content :(

When are thumbs generated? are they generated on the-fly or at import? Reason I ask is can I go and replace those in _resampled and be safe that they won't be overwritten?