Reputation: 6025
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?
Upvotes: 1
Views: 1572
Reputation: 1457
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 } } %>
Upvotes: 3