[] assetRepresentationMode: 'current' renames heic to jpeg without conversion.
Author: giantslogikCreated Feb 21, 2025Updated Aug 30, 2026
Labels:bug: Bug
Description
assetRepresentationMode: 'current' renames heic to jpeg without conversion.
How to repeat issue and example
- use assetRepresentationMode: 'current' and obtain an image.
- It provides a file with a .jpeg extension. While this file displays correctly on iOS / Android. It is NOT a .jpeg
- Make a copy of the file (via upload or sharing).
- Open the file on a desktop web browser. It will fail to display. (MacOS preview and other software that looks at the file header will successfully display it.)
- Rename the file to .heic it will display on a desktop web browser.
Solution
Do not change the extension when using assetRepresentationMode: 'current'. Workaround: use assetRepresentationMode: 'compatible'
Additional Information
- Image Picker version: 8.1.0
- React Native version: 0.74
- Platform: reproduced on iOS. You need a desktop web browser to actually see the problem.
- Development Operating System:MacOS
- Dev tools: Xcode 16.2
Source: react-native-image-picker/react-native-image-picker