Does Node gm have built-in support for resizing an image while preserving aspect ratio (ie., generating a thumbnail)? Or should I get the image size, calculate the proper ratio, and then call resize?
This question is inspired by PIL's similar functionality.
Jonathan's comment is the solution:
gm().resize(maxSize)
This resizes the image to width maxSize
. See the relevant documentation.