From 689e3778353e1a0dbe4f3e1b608dce9056240f87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nicole=20miko=C5=82ajczyk?= Date: Sat, 18 Oct 2025 23:44:01 +0200 Subject: [PATCH] pl-fe: increase DEFAULT_MAX_PIXELS to match Mastodon defaults MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: nicole mikołajczyk --- packages/pl-fe/src/actions/media.ts | 2 +- packages/pl-fe/src/utils/resize-image.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/pl-fe/src/actions/media.ts b/packages/pl-fe/src/actions/media.ts index aa5e12cbe..7cc944848 100644 --- a/packages/pl-fe/src/actions/media.ts +++ b/packages/pl-fe/src/actions/media.ts @@ -1,5 +1,6 @@ import { defineMessages, type IntlShape } from 'react-intl'; +import { useSettingsStore } from 'pl-fe/stores/settings'; import toast from 'pl-fe/toast'; import { isLoggedIn } from 'pl-fe/utils/auth'; import { formatBytes, getVideoDuration } from 'pl-fe/utils/media'; @@ -9,7 +10,6 @@ import { getClient } from '../api'; import type { MediaAttachment, UpdateMediaParams, UploadMediaParams } from 'pl-api'; import type { AppDispatch, RootState } from 'pl-fe/store'; -import { useSettingsStore } from 'pl-fe/stores/settings'; const messages = defineMessages({ exceededImageSizeLimit: { id: 'upload_error.image_size_limit', defaultMessage: 'Image exceeds the current file size limit ({limit})' }, diff --git a/packages/pl-fe/src/utils/resize-image.ts b/packages/pl-fe/src/utils/resize-image.ts index 205e7222a..faf3eb6ce 100644 --- a/packages/pl-fe/src/utils/resize-image.ts +++ b/packages/pl-fe/src/utils/resize-image.ts @@ -1,7 +1,7 @@ +/* eslint-disable no-case-declarations */ import { hasCanvasExtractPermission } from './favicon-service'; -/* eslint-disable no-case-declarations */ -const DEFAULT_MAX_PIXELS = 1920 * 1080; +const DEFAULT_MAX_PIXELS = 7680 * 4320; interface BrowserCanvasQuirks { 'image-orientation-automatic'?: boolean;