대표 이미지 원본 선택 보강 v1.7.9

This commit is contained in:
2026-06-24 10:16:40 +09:00
parent cab71285d8
commit a93780731c
12 changed files with 61 additions and 28 deletions

View File

@@ -0,0 +1,10 @@
const postCardThumbnailUrlPattern = /^\/uploads\/posts\/\d{4}\/\d{2}\/thumbs\/[^/?#]+-card\.webp$/i
/**
* 게시물 카드 썸네일 URL인지 확인한다.
* @param {string|null|undefined} imageUrl - 검사할 이미지 URL
* @returns {boolean} 카드 썸네일 여부
*/
export const isPostCardThumbnailUrl = (imageUrl) => Boolean(
imageUrl && postCardThumbnailUrlPattern.test(String(imageUrl))
)