Skip to content

Commit 6d09d12

Browse files
fix: update image URL base to use project domain
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent df6886d commit 6d09d12

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

app/src/composables/useImageUrl.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@ export type ImageSize = 'sm' | 'md' | 'lg' | 'xl' | 'full'
33
export function getImageUrl(src: string | null | undefined, _size: ImageSize = 'md'): string | undefined {
44
if (!src)
55
return undefined
6-
return src
6+
7+
if (src.startsWith('http://') || src.startsWith('https://'))
8+
return src
9+
10+
return `https://nitroping.dev/${src}`
711
}

app/src/lib/utils.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,10 @@ export function cn(...inputs: ClassValue[]) {
88

99
export function getImageUrl(path: string | null | undefined): string {
1010
if (!path)
11-
return '/images/book-placeholder.svg'
11+
return ''
1212

13-
// If already a full URL, return as is
14-
if (path.startsWith('http://') || path.startsWith('https://')) {
13+
if (path.startsWith('http://') || path.startsWith('https://'))
1514
return path
16-
}
1715

18-
// Add CDN prefix for S3 paths
19-
return `https://cdn.sayfa.app/${path}`
16+
return `https://nitroping.dev/${path}`
2017
}

0 commit comments

Comments
 (0)