From 62e16b7f1663527e294785b454a7e5130448bd70 Mon Sep 17 00:00:00 2001 From: Jeremy Kescher Date: Thu, 7 Jul 2022 00:21:05 +0200 Subject: [PATCH] Allow higher-resolution images (4096x4096) --- app/javascript/flavours/glitch/util/resize_image.js | 2 +- app/javascript/mastodon/utils/resize_image.js | 2 +- app/models/media_attachment.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/javascript/flavours/glitch/util/resize_image.js b/app/javascript/flavours/glitch/util/resize_image.js index fb8c3c11e6..6c759adbac 100644 --- a/app/javascript/flavours/glitch/util/resize_image.js +++ b/app/javascript/flavours/glitch/util/resize_image.js @@ -1,6 +1,6 @@ import EXIF from 'exif-js'; -const MAX_IMAGE_PIXELS = 2073600; // 1920x1080px +const MAX_IMAGE_PIXELS = 16777216; // 4096x4096px const _browser_quirks = {}; diff --git a/app/javascript/mastodon/utils/resize_image.js b/app/javascript/mastodon/utils/resize_image.js index fb8c3c11e6..6c759adbac 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 = 2073600; // 1920x1080px +const MAX_IMAGE_PIXELS = 16777216; // 4096x4096px const _browser_quirks = {}; diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb index 69feffbf0c..7fd93bb48a 100644 --- a/app/models/media_attachment.rb +++ b/app/models/media_attachment.rb @@ -67,7 +67,7 @@ class MediaAttachment < ApplicationRecord IMAGE_STYLES = { original: { - pixels: 2_073_600, # 1920x1080px + pixels: 16_777_216, # 4096x4096px file_geometry_parser: FastGeometryParser, }.freeze,