From a7952a2f69fbea25919c07ccfa48ceed174795c2 Mon Sep 17 00:00:00 2001 From: wuyingren Date: Thu, 13 Jun 2019 18:07:56 +0800 Subject: [PATCH] Set MAX_IMAGE_PIXELS to 4096x2160px (4K) --- app/javascript/mastodon/utils/resize_image.js | 2 +- app/models/media_attachment.rb | 2 +- 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 1628d7bff..37cd4c977 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 = 3686400; //1920x1920px +const MAX_IMAGE_PIXELS = 8847360; //4096x2160px const getImageUrl = inputFile => new Promise((resolve, reject) => { if (window.URL && URL.createObjectURL) { diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb index c3ec65683..a74edc327 100644 --- a/app/models/media_attachment.rb +++ b/app/models/media_attachment.rb @@ -40,7 +40,7 @@ class MediaAttachment < ApplicationRecord IMAGE_STYLES = { original: { - pixels: 3_686_400, #1920x1920px + pixels: 8_847_360, #4096x2160px file_geometry_parser: FastGeometryParser, },