Rails 4 Resizing and Cropping Images similar to Facebook
问题 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