Remove og compatibility check
This commit is contained in:
parent
d11cf6f62d
commit
51f9d4300d
@ -3,10 +3,7 @@
|
||||
import { Photo } from '@/photo';
|
||||
import { NextImageSize } from '@/platforms/next-image';
|
||||
import { IS_PREVIEW } from '@/app/config';
|
||||
import {
|
||||
doAllPhotosHaveOptimizedFiles,
|
||||
getOptimizedPhotoUrl,
|
||||
} from '@/photo/storage';
|
||||
import { getOptimizedPhotoUrl } from '@/photo/storage';
|
||||
import { fetchBase64ImageFromUrl } from '@/utility/image';
|
||||
import { getSignedUrlForUrl } from '@/platforms/storage';
|
||||
|
||||
@ -53,14 +50,11 @@ export default async function ImagePhotoGrid({
|
||||
const cellHeight= height / rows -
|
||||
(rows - 1) * gap / rows;
|
||||
|
||||
const doOptimizedFilesExist = await doAllPhotosHaveOptimizedFiles(photos);
|
||||
|
||||
const photoDataUrls = await Promise.all(photos.map(async({ id, url }) => {
|
||||
const optimizedUrl = getOptimizedPhotoUrl({
|
||||
imageUrl: url,
|
||||
size: nextImageWidth,
|
||||
addBypassSecret: IS_PREVIEW,
|
||||
compatibilityMode: !doOptimizedFilesExist,
|
||||
});
|
||||
const presignedUrl = await getSignedUrlForUrl(optimizedUrl, 'GET');
|
||||
const data = await fetchBase64ImageFromUrl(presignedUrl);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user