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 = {