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