File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
src/app/conf/2025/components Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 1
1
import type { ScheduleSession } from "@/app/conf/2025/schedule/_components/session-list"
2
2
import type { SchedSpeaker } from "@/app/conf/2023/types"
3
- import { ConferenceOpengraphImageHeader } from "./speaker-opengraph-image"
3
+ import { ConferenceOpengraphImageHeader , normalizeProtocolRelativeUrl } from "./speaker-opengraph-image"
4
4
import { getEventTitle } from "../utils"
5
5
import { formatSpeakerPosition } from "./format-speaker-position"
6
6
@@ -65,7 +65,7 @@ export default function ScheduleOpengraphImage({
65
65
< div className = "relative overflow-hidden" >
66
66
< div className = "absolute inset-0 z-[1] bg-sec-lighter mix-blend-multiply" />
67
67
< img
68
- src = { speakers [ 0 ] . avatar }
68
+ src = { normalizeProtocolRelativeUrl ( speakers [ 0 ] . avatar ) }
69
69
alt = ""
70
70
className = "size-[120px] object-cover"
71
71
width = { 120 }
@@ -110,3 +110,5 @@ export default function ScheduleOpengraphImage({
110
110
</ article >
111
111
)
112
112
}
113
+
114
+
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ export default function SpeakerOpengraphImage({
58
58
< div className = "relative flex overflow-hidden border-l-2 border-neu-300" >
59
59
< div className = "absolute inset-0 z-[1] bg-sec-lighter mix-blend-multiply" />
60
60
< img
61
- src = { speaker . avatar }
61
+ src = { normalizeProtocolRelativeUrl ( speaker . avatar ) }
62
62
alt = ""
63
63
className = "object-cover"
64
64
width = { RIGHT_COLUMN_WIDTH_PX }
@@ -133,3 +133,10 @@ export function ConferenceOpengraphImageHeader({
133
133
</ header >
134
134
)
135
135
}
136
+
137
+ export function normalizeProtocolRelativeUrl ( url : string ) {
138
+ if ( url . startsWith ( "//" ) ) {
139
+ return `https:${ url } `
140
+ }
141
+ return url
142
+ }
You can’t perform that action at this time.
0 commit comments