mattermost-mobile/app/constants/image.ts
Mattermost Build a84249a92f
fix: fixed image overflow in message attachments (#8361) (#8398)
* fix: fixed image overflow in message attachments

* fix: fixed image overflow in message attachments

(cherry picked from commit 9607f42243)

Co-authored-by: fxnm <47592197+fxnm@users.noreply.github.com>
2024-12-06 08:51:12 +02:00

20 lines
713 B
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
export const IMAGE_MAX_HEIGHT = 350;
export const IMAGE_MIN_DIMENSION = 50;
export const MAX_GIF_SIZE = 100 * 1024 * 1024;
export const VIEWPORT_IMAGE_OFFSET = 70;
export const VIEWPORT_IMAGE_REPLY_OFFSET = 11;
export const VIEWPORT_IMAGE_ATTACHMENT_OFFSET = 31.5; // (2 * 12) MessageAttachment Padding + (2,5 + 5) AttachmentImage Padding
export const MAX_RESOLUTION = 7680 * 4320; // 8K, ~33MPX
export default {
IMAGE_MAX_HEIGHT,
IMAGE_MIN_DIMENSION,
MAX_GIF_SIZE,
MAX_RESOLUTION,
VIEWPORT_IMAGE_OFFSET,
VIEWPORT_IMAGE_REPLY_OFFSET,
VIEWPORT_IMAGE_ATTACHMENT_OFFSET,
};