Is it possible to automate image cropper?

Nick's Avatar

Nick

11 Apr, 2011 02:25 AM

I'm wondering if it's possible to automate Image Cropper so that thumbnails are automatically generated when an asset is uploaded, bypassing the need to manually create one.

  1. 1 Posted by Byrne Reese on 11 Apr, 2011 04:04 AM

    Byrne Reese's Avatar

    Interesting idea, but I am not sure how that would work. Image Cropper is based upon the premise that a human can crop an image better than a computer and was a direct response to MT's poor automatic thumbnail generation.

    If you want to do automatic cropping, I would look for ways to do it using CSS alone.

    IMHO of course. Can you elaborate more on what you are thinking?

  2. 2 Posted by Nick on 11 Apr, 2011 06:29 AM

    Nick's Avatar

    The problem with CSS cropping is that it has to load the original image which would bypass any loading gains. And the problem with MT's native thumbnail generator is that it only produces square images. I was thinking more along the lines of setting up size profiles and automatically generating different thumbnails cropped to specified sizes.

  3. 3 Posted by Byrne Reese on 14 Apr, 2011 05:15 PM

    Byrne Reese's Avatar

    MT can produce more than just square thumbnails I assure you. What you can't do is generate thumbnails of arbitrary sizes. They can either be square or the original aspect ratio.

    So the strategy would be:

    • create thumbnail of image with closest possible size to desire size.
    • use CSS to crop the image according your desired aspect ratio.

    CSS would be something like this:
    * div with your specific size requirements * apply background image to div

  4. Byrne Reese closed this discussion on 14 Apr, 2011 05:15 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac