mirror of
https://github.com/discourse/discourse.git
synced 2025-03-30 21:06:21 +08:00
remove 'crop_tall_images' site setting but keep the behavior
This commit is contained in:
parent
667dd54a23
commit
32d253d484
@ -35,7 +35,7 @@ class Upload < ActiveRecord::Base
|
|||||||
opts = {
|
opts = {
|
||||||
filename: self.original_filename,
|
filename: self.original_filename,
|
||||||
allow_animation: SiteSetting.allow_animated_thumbnails,
|
allow_animation: SiteSetting.allow_animated_thumbnails,
|
||||||
crop: crop && SiteSetting.crop_tall_images
|
crop: crop
|
||||||
}
|
}
|
||||||
|
|
||||||
if thumbnail = OptimizedImage.create_for(self, width, height, opts)
|
if thumbnail = OptimizedImage.create_for(self, width, height, opts)
|
||||||
|
@ -1094,7 +1094,6 @@ en:
|
|||||||
max_users_notified_per_group_mention: "Maximum number of users that may recieve a notification if a group is mentioned (if threshold is met no notifications will be raised)"
|
max_users_notified_per_group_mention: "Maximum number of users that may recieve a notification if a group is mentioned (if threshold is met no notifications will be raised)"
|
||||||
|
|
||||||
create_thumbnails: "Create thumbnails and lightbox images that are too large to fit in a post."
|
create_thumbnails: "Create thumbnails and lightbox images that are too large to fit in a post."
|
||||||
crop_tall_images: "When creating a thumbnail of a tall image, crop it instead of generating a thin thumbnail."
|
|
||||||
|
|
||||||
email_time_window_mins: "Wait (n) minutes before sending any notification emails, to give users a chance to edit and finalize their posts."
|
email_time_window_mins: "Wait (n) minutes before sending any notification emails, to give users a chance to edit and finalize their posts."
|
||||||
private_email_time_window_seconds: "Wait (n) seconds before sending any private notification emails, to give users a chance to edit and finalize their messages."
|
private_email_time_window_seconds: "Wait (n) seconds before sending any private notification emails, to give users a chance to edit and finalize their messages."
|
||||||
|
@ -613,7 +613,6 @@ files:
|
|||||||
type: list
|
type: list
|
||||||
default: ''
|
default: ''
|
||||||
create_thumbnails: true
|
create_thumbnails: true
|
||||||
crop_tall_images: true
|
|
||||||
clean_up_uploads: true
|
clean_up_uploads: true
|
||||||
clean_orphan_uploads_grace_period_hours: 1
|
clean_orphan_uploads_grace_period_hours: 1
|
||||||
purge_deleted_uploads_grace_period_days: 30
|
purge_deleted_uploads_grace_period_days: 30
|
||||||
|
@ -208,7 +208,7 @@ class CookedPostProcessor
|
|||||||
return if is_a_hyperlink?(img)
|
return if is_a_hyperlink?(img)
|
||||||
|
|
||||||
crop = false
|
crop = false
|
||||||
if SiteSetting.crop_tall_images && (original_width.to_f / original_height.to_f < 0.75)
|
if original_width.to_f / original_height.to_f < 0.75
|
||||||
crop = true
|
crop = true
|
||||||
width, height = ImageSizer.crop(original_width, original_height)
|
width, height = ImageSizer.crop(original_width, original_height)
|
||||||
img["width"] = width
|
img["width"] = width
|
||||||
|
Loading…
x
Reference in New Issue
Block a user