New Podcast

Posted Tuesday, January 31 at 3:28 pm
  Thomas Turnbull (tom_o_t on drupal.org) and Alan Palazzolo (zzolo on drupal.org) join Mike Anello to talk about their new book from O’Reilly Media, Mapping with Drupal. Mike’s usual co-hosts, Andrew and Ryan, were both unable to participate in the podcast, leaving Thomas and Alan subject to Mike’s long-winded (but extremely interesting by some accounts) questions.
Download Podcast 73
DrupalEasy_ep73_20120131.mp3
Syndicate content

NEWSLETTER

Stay informed on our latest news!

Syndicate content

Testimonial

Mike & Ryan's session on March 11th was a great intro to what DrupalEasy training is capable of teaching. From solid fundamentals and practices, to a complex, automated feed aggregator, everything was laid out in plain detail, so any skill level, from Beginner, to Ninja could have picked it up quickly. I am anxiously waiting the next session, and encourage anyone who wants to sharpen their Drupal knowledge to drop by a session, and get their learn on

Who are we?

DrupalEasy is the collective expertise of Ryan Price and Michael Anello, who joined forces to provide training and consulting services worldwide. Read all about them and what they can do.

What is Drupal?

Drupal is a free, super-powerful content management system for sites that require information posting and collection, including blogs, forums, videos, photos, and databases of information. We think it is the best platform available. Here's why...

Why Drupal?

More and more savvy organizations are going with Drupal for content management, and its no mystery why. It’s free, flexible, and easy to maintain for small or large volume sites. Learn more...

Simple and exact image cropping

We all know imagecache is a great module to grab images of any size that are in your site's files/ directory, but sometimes it's hard to get every image to be the right size without black borders on the sides or top. The trick is to know the proper "order of operations".

Here's a fast recipe for square thumbnails that will work with landscape or portrait picture orientations:
Scale - width: 85, height: , upscale: No
Crop - width: 85, height: 85, xoffset: , yoffset: top
Scale And Crop - width: 25, height: 25

This is a recipe I use for user profile pictures, and it handles very wide or tall images well. Adjust the values proportionately to fit your needs. Step 3 is an optional step I apply in order to make a super-small thumbnail in certain places in the theme.

NOTE: the original size of the picture in this case is usually larger than 170px, but at the very least, it should be larger than the size of the initial scale. If you are starting with a very small picture, this recipe won't work as well.

Trackback URL for this post:

http://drupaleasy.com/trackback/123
No votes yet

More Quicktips


1 comment

Guest wrote 1 year 11 weeks ago

Thanks

Thank you very much for this post.
This was very helpful to me as I am very novice to drupal.
The "Scale And Crop - width: 25, height: 25" had gave me a bit small thumb than what I have assumed so I have edited it to "Scale And Crop - width: 40, height: 40", Then it gave me the exact thumb what I have assumed for.
Thank you very much again for this tutorial.

Pradeep.

Guest wrote 2 years 11 weeks ago

Thanks

Thanks for this tutorial. However, I'm still having problems with landscape images. I scale with width, in my case to 188, no height, not upscaling. I then crop to 188x188 with the yoffset of top. Portrait images work great, perfect width with bottom cut off. Landscapes, however, each have a black bar across the bottom.

I suppose I could scale huge and then crop, but I'm wanting as much of the image in the thumb as possible.

Syndicate content