1
votes

Using attachinary, in combination with cloudinary on Rails - is there a way to limit the size (width & height) of the uploaded image file before uploading it?

1

1 Answers

3
votes

You can use an incoming transformation to limit the dimensions of the uploaded image. Larger images will be scaled down, e.g.

<%= form.attachinary_file_field :image, cloudinary: { transformation: { width: 200, height: 200, crop: :limit } } %>