Rename image size config constants

IMAGE_SIZE_CONFIG_POSTS (4000px/2MB) and IMAGE_SIZE_CONFIG_2K_1MB
(2000px/1MB), replacing POST_IMG_MAX_SIZE and PROFILE_IMAGES_MAX_SIZE.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Eric Bailey
2026-06-02 12:25:02 -05:00
parent 736acb8a61
commit 2c3cba67c2
10 changed files with 29 additions and 29 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ import {sha256} from 'js-sha256'
import {CID} from 'multiformats/cid'
import * as Hasher from 'multiformats/hashes/hasher'
import {POST_IMG_MAX_SIZE} from '#/lib/constants'
import {IMAGE_SIZE_CONFIG_POSTS} from '#/lib/constants'
import {isNetworkError} from '#/lib/strings/errors'
import {shortenLinks, stripInvalidMentions} from '#/lib/strings/rich-text-manip'
import {logger} from '#/logger'
@@ -326,7 +326,7 @@ async function resolveMedia(
logger.debug(`Compressing image #${i}`)
const {path, width, height, mime} = await compressImage(
image,
POST_IMG_MAX_SIZE,
IMAGE_SIZE_CONFIG_POSTS,
)
logger.debug(`Uploading image #${i}`)
const res = await uploadBlob(agent, path, mime)