make image cropping optional

This commit is contained in:
Albert Yi
2018-07-09 10:06:20 -07:00
parent ac28c92fbd
commit 4d4f36c2c8
4 changed files with 11 additions and 1 deletions

View File

@@ -21,7 +21,7 @@ class PostPresenter < Presenter
end
path = options[:path_prefix] || "/posts"
if CurrentUser.id == 1 && options[:show_cropped] && post.has_cropped? && !CurrentUser.user.disable_cropped_thumbnails?
if Danbooru.config.enable_image_cropping && CurrentUser.id == 1 && options[:show_cropped] && post.has_cropped? && !CurrentUser.user.disable_cropped_thumbnails?
src = post.crop_file_url
imgClass = "cropped"
else