diff --git a/src/image-response/components/ImagePhotoGrid.tsx b/src/image-response/components/ImagePhotoGrid.tsx index 385e4012..f1b893a7 100644 --- a/src/image-response/components/ImagePhotoGrid.tsx +++ b/src/image-response/components/ImagePhotoGrid.tsx @@ -7,7 +7,6 @@ import { doAllPhotosHaveOptimizedFiles, getOptimizedPhotoUrl, } from '@/photo/storage'; -import { fetchBase64ImageFromUrl } from '@/utility/image'; export default async function ImagePhotoGrid({ photos, @@ -54,24 +53,7 @@ export default async function ImagePhotoGrid({ const doOptimizedFilesExist = await doAllPhotosHaveOptimizedFiles(photos); - const photoData = await Promise.all(photos.map(async ({ id, url }) => { - const data = await fetchBase64ImageFromUrl( - getOptimizedPhotoUrl({ - imageUrl: url, - size: nextImageWidth, - addBypassSecret: IS_PREVIEW, - compatibilityMode: !doOptimizedFilesExist, - }), - { mode: 'no-cors' }, - ); - return { id, data }; - })); - - const renderPhoto = ( - { id, data }: typeof photoData[number], - width: number, - height: number, - ) => + const renderPhoto = ({ id, url }: Photo, width: number, height: number) =>