add image cropping support

This commit is contained in:
Albert Yi
2018-05-16 17:13:36 -07:00
parent df73c682db
commit 64446d49e1
20 changed files with 150 additions and 471 deletions

View File

@@ -173,6 +173,10 @@ class Post < ApplicationRecord
storage_manager.file_path(md5, file_ext, :preview)
end
def crop_file_url
storage_manager.file_url(self, :crop)
end
def open_graph_image_url
if is_image?
if has_large?