·
1 commit
to main
since this release
8.1.0 (2026-04-13)
This minor plugin version introduces significant API changes and deprecations. While backward compatibility is maintained, migration is strongly recommended. Please read the release notes in full, and refer to https://capacitorjs.com/docs/apis/camera for full documentation, including migration guides.
Deprecations
getPhotomethod is deprecated. UsetakePhotofor a camera photo, orchooseFromGalleryto select from the gallery. For creating a prompt for the user to select which source, use@capacitor/action-sheetor any UI component of your choosing.pickImagesmethod is deprecated. UsechooseFromGalleryinstead. Refer to the Camera API documentation for more information on migrating.Photo,GalleryImageOptions, andCameraResultTypeare deprecated, only use them if you are still using the deprecatedgetPhotoand/orpickImages.- These deprecated items will be removed in a future major version of the Camera Plugin, please consider migrating to the new ones.
Features
- New
takePhotomethod added. It allows capturing a photo with the device's camera. - New
recordVideomethod added. It allows recording a video with the device's camera. Currently not available in Web. Addresses capacitor-plugins#229. - New
playVideomethod added. It opens a native player to play the provided video. Currently not available in Web. - New
chooseFromGallerymethod added. Use it to select photos and/or videos from the device. - New
MediaResultandMediaMetadatainterfaces, which are returned bytakePhoto,recordVideoandchooseFromGallery(metadata only if input parameterincludeMetadatais true). Besides providing most of the existing functionality from deprecatedgetPhoto/pickImages, it can include additional metadata like creation date, video duration, among others. - New
editPhotomethod added. Opens an in-app screen to edit a provided base64 encoded image. Supported editing features include image cropping and rotation. Currently not available in Web. - New
editURIPhotomethod added. Opens an in-app screen to edit a provided image from a URI. You may use the URIs returned bytakePhotoandchooseFromGalleryas input toeditURIPhoto. Supported editing features include image cropping and rotation. Currently not available in Web. - New Error structure when promise is rejected in new methods:
codeinOS-PLUG-CAMR-XXXXformat +message. Refer to plugin documentation for available errors. Existing methods from version 8.0.2 and older retain the same error structure as before for backwards-compatibility. - New methods implementation in new native libraries: https://github.com/ionic-team/ion-android-camera and https://github.com/ionic-team/ion-ios-camera.
Bug Fixes
- android: Restrict
pickImageslimit to maximum number supported by the device (clone of capacitor-plugins#2309)