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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user