about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2021-02-09 01:21:06 +0100
committerGitHub <noreply@github.com>2021-02-09 01:21:06 +0100
commitacf1842896682674d9ab4d0f87ec04c6174468fa (patch)
tree9f897f6d6293bcf2afdcc1be4dcdaf758aa692ac
parent4e933924bdea3392ebeaeaa7c341593eb200512c (diff)
Change max. image dimensions to 1920x1080px (1080p) (#15690)
* Change max. image size to 1920x1080px

* Change it in web UI too
-rw-r--r--app/javascript/mastodon/utils/resize_image.js2
-rw-r--r--app/models/media_attachment.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/mastodon/utils/resize_image.js b/app/javascript/mastodon/utils/resize_image.js
index 8f1485379..22ff86801 100644
--- a/app/javascript/mastodon/utils/resize_image.js
+++ b/app/javascript/mastodon/utils/resize_image.js
@@ -1,6 +1,6 @@
 import EXIF from 'exif-js';
 
-const MAX_IMAGE_PIXELS = 1638400; // 1280x1280px
+const MAX_IMAGE_PIXELS = 2073600; // 1920x1080px
 
 const _browser_quirks = {};
 
diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb
index 663bb0896..5cf4d8127 100644
--- a/app/models/media_attachment.rb
+++ b/app/models/media_attachment.rb
@@ -59,7 +59,7 @@ class MediaAttachment < ApplicationRecord
 
   IMAGE_STYLES = {
     original: {
-      pixels: 1_638_400, # 1280x1280px
+      pixels: 2_073_600, # 1920x1080px
       file_geometry_parser: FastGeometryParser,
     }.freeze,