From 188c704589673bc05b5d35a76976c09e7ccede01 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Sun, 13 Jul 2025 11:43:33 -0500 Subject: [PATCH] Make app og image match home feed --- app/home-image/route.tsx | 7 ++++++- src/feed/index.ts | 7 +++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/home-image/route.tsx b/app/home-image/route.tsx index 338d7f98..a8a2231a 100644 --- a/app/home-image/route.tsx +++ b/app/home-image/route.tsx @@ -8,6 +8,7 @@ import { getIBMPlexMono } from '@/app/font'; import { ImageResponse } from 'next/og'; import { getImageResponseCacheControlHeaders } from '@/image-response/cache'; import { isNextImageReadyBasedOnPhotos } from '@/photo'; +import { APP_OG_IMAGE_QUERY_OPTIONS } from '@/feed'; export const dynamic = 'force-static'; @@ -17,7 +18,11 @@ export async function GET() { headers, { fontFamily, fonts }, ] = await Promise.all([ - getPhotosCached({ limit: MAX_PHOTOS_TO_SHOW_OG }).catch(() => []), + getPhotosCached({ + ...APP_OG_IMAGE_QUERY_OPTIONS, + limit: MAX_PHOTOS_TO_SHOW_OG, + }) + .catch(() => []), getImageResponseCacheControlHeaders(), getIBMPlexMono(), ]); diff --git a/src/feed/index.ts b/src/feed/index.ts index 77ed8e1e..88fea6d7 100644 --- a/src/feed/index.ts +++ b/src/feed/index.ts @@ -34,6 +34,13 @@ export const FEED_META_QUERY_OPTIONS: PhotoQueryOptions = { ...FEED_BASE_QUERY_OPTIONS, }; +// APP OG IMAGE QUERY OPTIONS + +export const APP_OG_IMAGE_QUERY_OPTIONS: PhotoQueryOptions = { + ...FEED_BASE_QUERY_OPTIONS, + ...USER_DEFAULT_SORT_OPTIONS, +}; + // PROGRAMMATIC FEED QUERY OPTIONS export const PROGRAMMATIC_QUERY_OPTIONS: PhotoQueryOptions = {