diff --git a/src/components/Article/FullArticle.tsx b/src/components/Article/FullArticle.tsx index 83378973..205f54cf 100644 --- a/src/components/Article/FullArticle.tsx +++ b/src/components/Article/FullArticle.tsx @@ -317,7 +317,7 @@ export const FullArticle = (props: Props) => { props.article.layout !== 'image' } > - {props.article.title} + {props.article.cover_caption} diff --git a/src/utils/getImageUrl.ts b/src/utils/getImageUrl.ts index 93f7f616..1d7123d7 100644 --- a/src/utils/getImageUrl.ts +++ b/src/utils/getImageUrl.ts @@ -14,12 +14,5 @@ const getSizeUrlPart = (options: { width?: number; height?: number } = {}) => { export const getImageUrl = (src: string, options: { width?: number; height?: number } = {}) => { const sizeUrlPart = getSizeUrlPart(options) - const thumborPrefix = `${thumborUrl}/unsafe/` - - if (src.startsWith(thumborPrefix)) { - const thumborKey = src.replace(thumborPrefix, '') - return `${thumborUrl}/unsafe/${sizeUrlPart}${thumborKey}` - } - - return `${thumborUrl}/unsafe/${sizeUrlPart}${src}` + return `${thumborUrl}/unsafe/${sizeUrlPart}${src.replace(thumborUrl, '').replace('/unsafe', '')}` }