From 77949edd9d9a603bf7510758ff067842438ec364 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Tue, 6 Jan 2026 00:24:36 -0800 Subject: [PATCH] use aws cdn for picker images --- src/lib/utils/element.ts | 2 +- src/lib/utils/proficiency.ts | 2 +- src/lib/utils/rarity.ts | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lib/utils/element.ts b/src/lib/utils/element.ts index c18221a1..da980d33 100644 --- a/src/lib/utils/element.ts +++ b/src/lib/utils/element.ts @@ -73,5 +73,5 @@ export function getOppositeElement(element?: number): number | undefined { export function getElementImage(element?: number): string { if (element === undefined || element === null) return '' const label = ELEMENT_LABELS[element]?.toLowerCase() ?? 'null' - return `/images/elements/${label}.png` + return `${getBasePath()}/elements/${label}.png` } \ No newline at end of file diff --git a/src/lib/utils/proficiency.ts b/src/lib/utils/proficiency.ts index 529f6579..21cf2637 100644 --- a/src/lib/utils/proficiency.ts +++ b/src/lib/utils/proficiency.ts @@ -36,5 +36,5 @@ export function getProficiencyOptions() { export function getProficiencyImage(proficiency: number): string { const label = PROFICIENCY_LABELS[proficiency] if (!label || label === 'None') return '' - return `/images/proficiencies/${label.toLowerCase()}.png` + return `${getBasePath()}/proficiencies/${label.toLowerCase()}.png` } diff --git a/src/lib/utils/rarity.ts b/src/lib/utils/rarity.ts index 841bb711..d5f29f36 100644 --- a/src/lib/utils/rarity.ts +++ b/src/lib/utils/rarity.ts @@ -1,3 +1,5 @@ +import { getBasePath } from '$lib/utils/images' + export const RARITY_LABELS: Record = { 1: 'R', 2: 'SR', @@ -39,5 +41,5 @@ export function getRarityClass(rarity: number): string { export function getRarityImage(rarity: number): string { const label = RARITY_LABELS[rarity] if (!label) return '' - return `/images/rarity/${label.toLowerCase()}.png` + return `${getBasePath()}/rarity/${label.toLowerCase()}.png` } \ No newline at end of file