Skip to content

Thumbnail not reflecting for edited images from gallery into our App #371

@Kmannam-sos

Description

@Kmannam-sos

Description

Description
Thumbnail not reflecting for edited images from gallery into our App

version details:
react native: installed: 0.79.5
"@d11/react-native-fast-image": "^8.9.2",

Steps to reproduce

Edit any image in the photo library and save it. After that, open our app and go through the photo selection process. Observe that the thumbnail is not showing the latest updated photo—it still displays the old thumbnail even after reopening the app freshly.

`const loadNextPagePictures = useCallback(async () => {
try {
const { edges, page_info } = await CameraRoll.getPhotos({
first: pageSize,
after: nextCursor,
assetType: 'Photos',
include: ['fileSize', 'filename', 'imageSize'],
groupName: albumName,
...(Platform.OS === 'ios' && { groupTypes: albumType }),
});

        const processedEdges = await Promise.all(
            edges.map(async edge => {
                if (Platform.OS === 'ios') {
                    try {
                        const thumb = await CameraRoll.getPhotoThumbnail(
                            edge.node.image.uri,
                            {
                                allowNetworkAccess: true,
                                targetSize: { width: 200, height: 200 },
                                quality: 0.8,
                            }
                        );

                        return {
                            ...edge,
                            node: {
                                ...edge.node,
                                image: {
                                    ...edge.node.image,
                                    imageBase64: thumb.thumbnailBase64,
                                },
                            },
                        };
                    } catch (e) {
                        return edge;
                    }
                }
                return edge;
            })
        );

        // Filter out duplicates using internalID
        const uniqueEdges = processedEdges.filter(edge => {
            const id = edge.node.image.uri;
            if (seenIDs.current.has(id)) return false;
            seenIDs.current.add(id);
            return true;
        });

        setAlbumPictures(prev => [...prev, ...uniqueEdges]);
        setNextCursor(page_info.end_cursor);
        setHasNextPage(page_info.has_next_page);
    } catch (error) {
        console.error('GalleryScreen getPhotos error:', error);
    }
}, [nextCursor]);

`

Expected behavior

Should show the updated thumbnail for the edit photos

Image

Stacktrace or Logs

--

Output of npx react-native info

System:
  OS: macOS 15.6
  CPU: (8) arm64 Apple M1 Pro
  Memory: 140.56 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.19.4
    path: ~/.nvm/versions/node/v20.19.4/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v20.19.4/bin/yarn
  npm:
    version: 10.8.2
    path: ~/.nvm/versions/node/v20.19.4/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2025.1 AI-251.26094.121.2512.13840223
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.16
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 18.0.1
    wanted: 18.0.1
  react:
    installed: 19.0.0
    wanted: 19.0.0
  react-native:
    installed: 0.79.5
    wanted: 0.79.5
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Affected React-Native Architecture

Old Architecture

Affected Platforms

Runtime - iOS

Reproducer

Screenshots and Videos

Actual behaviour with our code

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions