I currently use yanex rich content api to get pages summaries in my rails 4 app. What is the best way to format the images similar to how Facebook does it? Facebook sometimes shows an image with the size of 377px by 177px which they crop and scale the original so it can maintain the aspect ratio. They also show images to fit a 90px by 90px div which just scale (no crop) the original image.
you can see examples of the two different sizes here: https://www.facebook.com/pages/Coffee-News-Now/209732789217831?ref=hl
Should I use imagemagick and if so what is the logic to determine which image size to show (larger image: cropped/scaled or smaller image: scaled)?