posts: always show "resized to X%" notice on mobile.

Always show the "Resized to X% of original" notice when viewing a sample
image on mobile.
This commit is contained in:
evazion
2020-07-31 15:07:36 -05:00
parent 1c6451b4c7
commit 3fe18c57d0
3 changed files with 11 additions and 3 deletions

View File

@@ -269,6 +269,7 @@ class Post < ApplicationRecord
end
def resize_percentage
return 100 if image_width.to_i == 0
100 * large_image_width.to_f / image_width.to_f
end