@@ -43,7 +43,7 @@ async function findSpeakerByProvider(
4343 `*[ _type == "speaker" && $id in providers][0]{
4444 ...,
4545 "slug": slug.current,
46- "image": image.asset->url
46+ "image": coalesce( image.asset->url, imageURL)
4747 }` ,
4848 { id } ,
4949 )
@@ -65,7 +65,7 @@ async function findSpeakerByEmail(
6565 `*[ _type == "speaker" && email == $email][0]{
6666 ...,
6767 "slug": slug.current,
68- "image": image.asset->url
68+ "image": coalesce( image.asset->url, imageURL)
6969 }` ,
7070 { email } ,
7171 )
@@ -165,7 +165,7 @@ export async function getSpeaker(
165165 `*[ _type == "speaker" && _id == $speakerId][0]{
166166 ...,
167167 "slug": slug.current,
168- "image": image.asset->url
168+ "image": coalesce( image.asset->url, imageURL)
169169 }` ,
170170 { speakerId } ,
171171 { cache : 'no-store' } ,
@@ -187,7 +187,7 @@ export async function getPublicSpeaker(
187187 try {
188188 data = await clientReadCached . fetch (
189189 `*[ _type == "speaker" && slug.current == $speakerSlug && count(*[_type == "talk" && references(^._id) && status == "confirmed" && conference._ref == $conferenceId]) > 0][0]{
190- name, title, bio, links, flags, "image": image.asset->url,
190+ name, title, bio, links, flags, "image": coalesce( image.asset->url, imageURL) ,
191191 "talks": *[_type == "talk" && references(^._id) && status == "confirmed" && conference._ref == $conferenceId]{
192192 _id, title, description, language, level, format, audiences, video,
193193 attachments[]{
@@ -197,7 +197,7 @@ export async function getPublicSpeaker(
197197 }
198198 },
199199 speakers[]-> {
200- _id, name, title, "slug": slug.current, "image": image.asset->url
200+ _id, name, title, "slug": slug.current, "image": coalesce( image.asset->url, imageURL)
201201 },
202202 topics[]-> {
203203 _id, title, "slug": slug.current
@@ -319,7 +319,7 @@ export async function getSpeakers(
319319 const query = groq `*[_type == "speaker" && count(*[_type == "talk" && references(^._id) && status in [${ statusFilter } ] ${ conferenceFilter } ]) > 0] {
320320 ...,
321321 "slug": slug.current,
322- "image": image.asset->url,
322+ "image": coalesce( image.asset->url, imageURL) ,
323323 "proposals": *[_type == "talk" && references(^._id) && status in [${ statusFilter } ] ${ proposalsConferenceFilter } ] {
324324 _id,
325325 title,
@@ -396,7 +396,7 @@ export async function getOrganizers(): Promise<{
396396 const query = groq `*[_type == "speaker" && isOrganizer == true] {
397397 ...,
398398 "slug": slug.current,
399- "image": image.asset->url
399+ "image": coalesce( image.asset->url, imageURL)
400400 } | order(name asc)`
401401
402402 speakers = await clientRead . fetch ( query , { } , { cache : 'no-store' } )
@@ -419,7 +419,7 @@ export async function getOrganizersByConference(conferenceId: string): Promise<{
419419 const query = groq `*[_type == "conference" && _id == $conferenceId][0].organizers[]-> {
420420 ...,
421421 "slug": slug.current,
422- "image": image.asset->url
422+ "image": coalesce( image.asset->url, imageURL)
423423 } | order(name asc)`
424424
425425 speakers = await clientRead . fetch (
0 commit comments