Archived from the Transloadit support forum. Originally posted on July 15, 2011; details may be outdated, see our docs for current behavior. Original thread
I’m going to let users upload images but there’s no
way to figure out if the image is portrait or landscape,
Somehow I need an Image to be 180 width x 135 height if its landscape 135 width x 180 height if its portrait
Hey Allan,
well you could resize all images to 180x180 using the “fit” resize strategy. This would make sure that either width or height is 180px at the maximum. If all your images are in the proper aspect ratio already, the other part (width or height) should automatically turn to 135px. This is because “fit” preserves aspect ratio.