Saving the images Dimensions (width and height) in Paperclip?
Just for the sake of completeness, even though previous answers already show good enough suggestions. You can utilize Paperclip event handlers instead of Rails callbacks. In this case, size will be recalculated only when image changes. (If you’re using S3 for storage, this can save quite some time) has_attached_file :image, :styles => … after_post_process :save_image_dimensions … Read more