From 945e5b066a1be36de998e86980770ad4572b82cb Mon Sep 17 00:00:00 2001 From: Anton Tranelis <31516529+antontranelis@users.noreply.github.com> Date: Wed, 6 Aug 2025 15:04:52 +0200 Subject: [PATCH] feat(lib): add support for external images in items (#291) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add support for external images in items Add image_external field to Item type and update HeaderView to prefer external images over internal ones when available. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude * fix: prettier formatting for external image feature --------- Co-authored-by: Claude --- .../Map/Subcomponents/ItemPopupComponents/HeaderView.tsx | 4 +++- lib/src/types/Item.d.ts | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.tsx b/lib/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.tsx index 64b8d07b..7a79481e 100644 --- a/lib/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.tsx +++ b/lib/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.tsx @@ -57,7 +57,9 @@ export function HeaderView({ const [imageLoaded, setImageLoaded] = useState(false) - const avatar = item.image && appState.assetsApi.url + item.image + '?width=160&heigth=160' + const avatar = + item.image_external || + (item.image && appState.assetsApi.url + item.image + '?width=160&heigth=160') const title = item.name const subtitle = item.subname diff --git a/lib/src/types/Item.d.ts b/lib/src/types/Item.d.ts index 12d4b8e2..d211adfe 100644 --- a/lib/src/types/Item.d.ts +++ b/lib/src/types/Item.d.ts @@ -46,6 +46,7 @@ export interface Item { slug?: string user_created?: UserItem image?: string + image_external?: string group_type?: string offers?: TagIds needs?: TagIds