File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -243,6 +243,7 @@ export function SpeakersPreview({ speakers }: { speakers: Profile[] }) {
243243/**
244244 * Social preview for the landing page
245245 * w1200 h630: 8 images - 4 per row (2 rows)
246+ * one img will be 315x300
246247 */
247248export function LandingPagePreview ( { images } : { images : Image [ ] } ) {
248249 const maxImages = 8 ;
Original file line number Diff line number Diff line change @@ -14,7 +14,18 @@ export async function loader({ context }: Route.LoaderArgs) {
1414 s3Client : context . s3Client ,
1515 } ) ;
1616
17- const jsx = < LandingPagePreview images = { pastEventImages } /> ;
17+ const resizedImages = pastEventImages . map ( ( image ) => {
18+ const search = new URLSearchParams ( ) ;
19+ search . set ( "w" , "300" ) ;
20+ search . set ( "h" , "315" ) ;
21+ search . set ( "src" , image . url ) ;
22+ return {
23+ ...image ,
24+ url : context . mainConfig . origin + "/img" + "?" + search . toString ( ) ,
25+ } ;
26+ } ) ;
27+
28+ const jsx = < LandingPagePreview images = { resizedImages } /> ;
1829 const svg = await time ( "satori" , async ( ) =>
1930 satori ( jsx , {
2031 width : 1200 ,
You can’t perform that action at this time.
0 commit comments