https://github.com/lodev09/react-native-exify
Read and write Exif metadata from/into an image 🏷️
https://github.com/lodev09/react-native-exify
android exif exif-metadata ios react-native react-native-vision-camera
Last synced: 4 months ago
JSON representation
Read and write Exif metadata from/into an image 🏷️
- Host: GitHub
- URL: https://github.com/lodev09/react-native-exify
- Owner: lodev09
- License: mit
- Created: 2024-03-10T04:02:39.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-30T21:06:08.000Z (about 2 years ago)
- Last Synced: 2025-08-23T17:57:27.577Z (10 months ago)
- Topics: android, exif, exif-metadata, ios, react-native, react-native-vision-camera
- Language: Kotlin
- Homepage:
- Size: 2.9 MB
- Stars: 40
- Watchers: 3
- Forks: 2
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# React Native Exify
[](https://github.com/lodev09/react-native-exify/actions/workflows/ci.yml)

[](https://deepwiki.com/lodev09/react-native-exify)
A simple library to read and write image Exif metadata for your React Native Apps. 🏷️

## Features
* Read Exif data from an image
* Write Exif data into an image
* Tags are typed and standardized
* Works with Expo and bare React Native projects
* Supports New Architecture (Turbo Module)
## Installation
```sh
yarn add @lodev09/react-native-exify
```
## Usage
```tsx
import * as Exify from '@lodev09/react-native-exify';
```
### Reading Exif 🔍
```tsx
const uri = 'file://path/to/image.jpg'
const tags = await Exify.read(uri)
console.log(tags)
```
> [!IMPORTANT]
> The `uri` must include a scheme (e.g. `file://`, `ph://`, `content://`). Bare file paths like `/var/mobile/.../image.jpg` are not supported and will throw an error.
> [!NOTE]
> On Android 10+, GPS data is redacted from `content://` URIs by default. The library automatically requests `ACCESS_MEDIA_LOCATION` at runtime to access unredacted location data. Your app must have media read access (`READ_MEDIA_IMAGES` or `READ_EXTERNAL_STORAGE`) granted first.
> If you're already using a library like [`expo-media-library`](https://docs.expo.dev/versions/latest/sdk/media-library/) that grants `ACCESS_MEDIA_LOCATION`, exify will use the existing grant.
### Writing Exif ✍️
```tsx
import type { ExifTags } from '@lodev09/react-native-exify';
const uri = 'file://path/to/image.jpg'
const newTags: ExifTags = {
GPSLatitude: 69.69,
GPSLongitude: 69.69,
UserComment: 'Someone wrote GPS here!',
}
const result = await Exify.write(uri, newTags)
console.log(result.tags)
```
> [!NOTE]
> On iOS, writing exif into an Asset file will duplicate the image. iOS does not allow writing exif into an Asset file directly.
> If you're getting the photo from a [camera](https://docs.expo.dev/versions/latest/sdk/camera/), write it into the output file first before saving to the Asset library!
## Example
See [example](example) for more detailed usage.
### Built with True Sheet
The example app uses [@lodev09/react-native-true-sheet](https://github.com/lodev09/react-native-true-sheet) for the image picker UI. Check it out!
## Contributing
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
## License
[MIT](LICENSE)
---
Made with ❤️ by [@lodev09](http://linkedin.com/in/lodev09/)