Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diiiary/capacitor-plugin-photo-library
https://github.com/diiiary/capacitor-plugin-photo-library
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/diiiary/capacitor-plugin-photo-library
- Owner: diiiary
- Created: 2019-08-16T10:36:55.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-21T09:47:06.000Z (over 5 years ago)
- Last Synced: 2024-11-08T02:38:15.728Z (about 1 month ago)
- Language: Swift
- Size: 163 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-capacitor - Photo library - Get all the images from system album. (Other plugins)
README
# capacitor-plugin-photo-library
This plugin mainly used for getting all the images from system album and display using your own HTML/CSS.
## Process:
- ✅[ios] getPhotos
- ☑️[Android] need your help! please submit your changes, I will merge and publish## Install
```
npm install capacitor-plugin-photo-library
npx cap sync
```## Methods
### getPhotos
Read the photos by ids or limit/offset
```javascript
const { total, images } = await Capacitor.Plugins.PhotoLibrary.getPhotos({
ids: [], // photo ids
offset: 0, // fetch offset (will be ignored when ids set)
limit: 10, // fetch limit (will be ignored when ids set)
width: 200, // image width
height: 200, // image height
quality: 100, // image quality
mode: "fast" // mode: fast | exact
});
images.map(image => {
const { id, createTime, dataUrl, location } = image;
// ...
});
```## Licence
MIT
## Thank you!