본문 이미지 파생 파일명 정리

This commit is contained in:
2026-07-02 11:09:14 +09:00
parent 486c8bfe76
commit 7c9b5e9278
14 changed files with 59 additions and 23 deletions

View File

@@ -20,7 +20,7 @@ const contentTypes = new Map([
['.svg', 'image/svg+xml'],
['.ico', 'image/x-icon']
])
const regeneratableUploadPattern = /^\/uploads\/posts\/\d{4}\/\d{2}\/thumbs\/[^/?#]+-(?:card|page-cover|body|body-720|lightbox)\.webp$/i
const regeneratableUploadPattern = /^\/uploads\/posts\/\d{4}\/\d{2}\/thumbs\/[^/?#]+-(?:card|page-cover|body|body-720|body-1600|body-2560|lightbox)\.webp$/i
/**
* 업로드 파일 캐시 정책을 반환한다.

View File

@@ -5,6 +5,8 @@ import { getSiteSettings, listAdminPosts, listAdminTags, listPages } from '../re
import { getPostgresClient } from '../repositories/postgres-client'
import {
getPageCoverThumbnailUrl,
getLegacyPostBodyThumbnailUrl,
getLegacyPostLightboxThumbnailUrl,
getPostBodyPreviewThumbnailUrl,
getPostBodyThumbnailUrl,
getPostLightboxThumbnailUrl,
@@ -608,7 +610,9 @@ const buildPostBodyThumbnailOwnerMap = (items) => {
const bodyDerivativeUrlGetters = [
getPostBodyThumbnailUrl,
getPostBodyPreviewThumbnailUrl,
getPostLightboxThumbnailUrl
getPostLightboxThumbnailUrl,
getLegacyPostBodyThumbnailUrl,
getLegacyPostLightboxThumbnailUrl
]
for (const item of items) {

View File

@@ -4,6 +4,8 @@ import { dirname, extname, join, posix } from 'node:path'
import sharp from 'sharp'
import {
getPageCoverThumbnailUrl,
getLegacyPostBodyThumbnailUrl,
getLegacyPostLightboxThumbnailUrl,
getPostBodyPreviewThumbnailUrl,
getPostBodyThumbnailUrl,
getPostLightboxThumbnailUrl,
@@ -14,6 +16,8 @@ import {
export {
getPageCoverThumbnailUrl,
getLegacyPostBodyThumbnailUrl,
getLegacyPostLightboxThumbnailUrl,
getPostBodyPreviewThumbnailUrl,
getPostBodyThumbnailUrl,
getPostLightboxThumbnailUrl,