Only generate image thumbnails when AI is enabled

This commit is contained in:
Sam Becker 2024-05-06 10:30:32 -05:00
parent 4a8e56f5bb
commit a493619bca

View File

@ -19,9 +19,10 @@ export default async function PhotoEditPage({
const hasAiTextGeneration = AI_TEXT_GENERATION_ENABLED;
const imageThumbnailBase64 = await resizeImageFromUrl(
getNextImageUrlForRequest(photo.url, 640),
);
// Only generate image thumbnails when AI generation is enabled
const imageThumbnailBase64 = AI_TEXT_GENERATION_ENABLED
? await resizeImageFromUrl(getNextImageUrlForRequest(photo.url, 640))
: '';
return (
<PhotoEditPageClient {...{