diff --git a/invokeai/frontend/web/src/features/gallery/components/CurrentImage/CurrentImageButtons.tsx b/invokeai/frontend/web/src/features/gallery/components/CurrentImage/CurrentImageButtons.tsx index af5aff52d8..3559679fc4 100644 --- a/invokeai/frontend/web/src/features/gallery/components/CurrentImage/CurrentImageButtons.tsx +++ b/invokeai/frontend/web/src/features/gallery/components/CurrentImage/CurrentImageButtons.tsx @@ -110,7 +110,7 @@ const CurrentImageButtons = (props: CurrentImageButtonsProps) => { ); const { metadata, workflow, isLoading } = useGetImageMetadataFromFileQuery( - lastSelectedImage?.image_name ?? skipToken, + lastSelectedImage ?? skipToken, { selectFromResult: (res) => ({ isLoading: res.isFetching, diff --git a/invokeai/frontend/web/src/features/gallery/components/ImageContextMenu/SingleSelectionMenuItems.tsx b/invokeai/frontend/web/src/features/gallery/components/ImageContextMenu/SingleSelectionMenuItems.tsx index 272f63fc93..e75a7745bb 100644 --- a/invokeai/frontend/web/src/features/gallery/components/ImageContextMenu/SingleSelectionMenuItems.tsx +++ b/invokeai/frontend/web/src/features/gallery/components/ImageContextMenu/SingleSelectionMenuItems.tsx @@ -52,7 +52,7 @@ const SingleSelectionMenuItems = (props: SingleSelectionMenuItemsProps) => { const isCanvasEnabled = useFeatureStatus('unifiedCanvas').isFeatureEnabled; const { metadata, workflow, isLoading } = useGetImageMetadataFromFileQuery( - imageDTO.image_name, + imageDTO, { selectFromResult: (res) => ({ isLoading: res.isFetching, diff --git a/invokeai/frontend/web/src/features/gallery/components/ImageMetadataViewer/ImageMetadataViewer.tsx b/invokeai/frontend/web/src/features/gallery/components/ImageMetadataViewer/ImageMetadataViewer.tsx index 51a734c49a..ca3eab2dba 100644 --- a/invokeai/frontend/web/src/features/gallery/components/ImageMetadataViewer/ImageMetadataViewer.tsx +++ b/invokeai/frontend/web/src/features/gallery/components/ImageMetadataViewer/ImageMetadataViewer.tsx @@ -27,15 +27,12 @@ const ImageMetadataViewer = ({ image }: ImageMetadataViewerProps) => { // dispatch(setShouldShowImageDetails(false)); // }); - const { metadata, workflow } = useGetImageMetadataFromFileQuery( - image.image_name, - { - selectFromResult: (res) => ({ - metadata: res?.currentData?.metadata, - workflow: res?.currentData?.workflow, - }), - } - ); + const { metadata, workflow } = useGetImageMetadataFromFileQuery(image, { + selectFromResult: (res) => ({ + metadata: res?.currentData?.metadata, + workflow: res?.currentData?.workflow, + }), + }); return (