{"_id":"@capawesome/capacitor-photo-manipulator","_rev":"4-9d971e6df5888221081c578fe9873ebb","name":"@capawesome/capacitor-photo-manipulator","dist-tags":{"latest":"0.1.2"},"versions":{"0.0.1":{"name":"@capawesome/capacitor-photo-manipulator","version":"0.0.1","keywords":["capacitor","plugin","native","photo manipulator","image manipulator","heic to jpeg","image resize","image crop","image convert"],"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","_id":"@capawesome/capacitor-photo-manipulator@0.0.1","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"homepage":"https://capawesome.io/docs/sdks/capacitor/photo-manipulator/","bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"dist":{"shasum":"9536f983db529c838fc0eeb8be0f9104385c6d28","tarball":"https://registry.npmjs.org/@capawesome/capacitor-photo-manipulator/-/capacitor-photo-manipulator-0.0.1.tgz","fileCount":42,"integrity":"sha512-2uvD6oX4C03ZCMdsDi5Qxev5F0nu2V/wzOariNeLxCKw12P1T4ZQBdhZePt4IneVk1HKSCnh65EoigQPCby6/w==","signatures":[{"sig":"MEQCIAeQSVV2kFSX6p1CcCKCLurwSXGzwvhDHITjTwTL/EvTAiAidMucFphloX20wqY6zaf7mC3/18Bx1DpAyqt/XYlYEQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":185998},"main":"dist/plugin.cjs.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","module":"dist/esm/index.js","funding":[{"url":"https://github.com/sponsors/capawesome-team/","type":"github"},{"url":"https://opencollective.com/capawesome","type":"opencollective"}],"gitHead":"a8c9e0f3c4687c6a9f4fc7554f3dc79536ad5154","scripts":{"fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","docgen":"docgen --api PhotoManipulatorPlugin --output-readme README.md --output-json dist/docs.json","eslint":"eslint . --ext ts","verify":"npm run verify:ios && npm run verify:android && npm run verify:web","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","verify:web":"npm run build","prepublishOnly":"npm run build","verify:android":"cd android && ./gradlew clean build test && cd ..","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd .."},"_npmUser":{"name":"robingenz","email":"mail@robingenz.dev"},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"repository":{"url":"git+https://github.com/capawesome-team/capacitor-plugins.git","type":"git"},"_npmVersion":"11.13.0","description":"Capacitor plugin for headless image transforms like crop, resize, rotate, flip and format conversion, including HEIC to JPEG.","directories":{},"_nodeVersion":"24.16.0","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.0","rimraf":"6.1.2","rollup":"4.53.3","swiftlint":"2.0.0","typescript":"5.9.3","@capacitor/cli":"8.0.0","@capacitor/ios":"8.0.0","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/android":"8.0.0","@ionic/eslint-config":"0.4.0","prettier-plugin-java":"2.6.7"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/capacitor-photo-manipulator_0.0.1_1783449376773_0.28320118483891044","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@capawesome/capacitor-photo-manipulator","version":"0.1.0","keywords":["capacitor","plugin","native","photo manipulator","image manipulator","heic to jpeg","image resize","image crop","image convert","capacitor-plugin","image rotate","image flip","thumbnail","heic converter","avif to jpeg","image format conversion","strip exif"],"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","_id":"@capawesome/capacitor-photo-manipulator@0.1.0","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"homepage":"https://capawesome.io/docs/sdks/capacitor/photo-manipulator/","bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"dist":{"shasum":"b9c43f02123a384f23914d8aa0af1f51dbe018b7","tarball":"https://registry.npmjs.org/@capawesome/capacitor-photo-manipulator/-/capacitor-photo-manipulator-0.1.0.tgz","fileCount":42,"integrity":"sha512-piCkAFBTnDvPgY4h03b58nOFCg4BUZTtkEzcWBJE25KOlpO9jEOb4PqmswEOBB9uaegTDksNzki7Fl/lbi2PyA==","signatures":[{"sig":"MEUCIQCPTH6NVOXQTQXa9oF9Vpe2U2Jf36CNiDlFPoDH6BxMBQIgPpwADHlrpATDw4OYgj9JRuzyhJINC3G60xpjbTTWDt4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@capawesome%2fcapacitor-photo-manipulator@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":191473},"main":"dist/plugin.cjs.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","module":"dist/esm/index.js","funding":[{"url":"https://github.com/sponsors/capawesome-team/","type":"github"},{"url":"https://opencollective.com/capawesome","type":"opencollective"}],"gitHead":"1ce17b1fd14c43b2f1d5d3c2da82221e1d1dca37","scripts":{"fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","docgen":"docgen --api PhotoManipulatorPlugin --output-readme README.md --output-json dist/docs.json","eslint":"eslint . --ext ts","verify":"npm run verify:ios && npm run verify:android && npm run verify:web","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","verify:web":"npm run build","prepublishOnly":"npm run build","verify:android":"cd android && ./gradlew clean build test && cd ..","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd .."},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:18100cd9-7912-4a7d-9380-40f6d089ce39"}},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"repository":{"url":"git+https://github.com/capawesome-team/capacitor-plugins.git","type":"git"},"_npmVersion":"11.16.0","description":"Capacitor plugin for headless image transforms like crop, resize, rotate, flip and format conversion, including HEIC to JPEG, on Android, iOS, and Web.","directories":{},"_nodeVersion":"24.18.0","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.0","rimraf":"6.1.2","rollup":"4.53.3","swiftlint":"2.0.0","typescript":"5.9.3","@capacitor/cli":"8.0.0","@capacitor/ios":"8.0.0","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/android":"8.0.0","@ionic/eslint-config":"0.4.0","prettier-plugin-java":"2.6.7"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/capacitor-photo-manipulator_0.1.0_1784015576945_0.8933902512902883","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@capawesome/capacitor-photo-manipulator","version":"0.1.1","keywords":["capacitor","plugin","native","photo manipulator","image manipulator","heic to jpeg","image resize","image crop","image convert","capacitor-plugin","image rotate","image flip","thumbnail","heic converter","avif to jpeg","image format conversion","strip exif"],"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","_id":"@capawesome/capacitor-photo-manipulator@0.1.1","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"homepage":"https://capawesome.io/docs/sdks/capacitor/photo-manipulator/","bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"dist":{"shasum":"4417628be66d1ece989b8089d24460549ff44c3e","tarball":"https://registry.npmjs.org/@capawesome/capacitor-photo-manipulator/-/capacitor-photo-manipulator-0.1.1.tgz","fileCount":42,"integrity":"sha512-XyTSzlphfABkmaywrY0gKfjImVI8T/z7bVgVcDWAZhE8Aq9YQiHWNIGzaxyC3kj3JAYC3PdE0EThHlGYjPNAHA==","signatures":[{"sig":"MEUCIQCX/ePUGH2pqePXC1sWAzETR8jIEj8bSyVp2RLsAHUZggIgeVgYPWZCdETZX+HWg47GPQw1PAih/qIriV3eZLVIJu0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@capawesome%2fcapacitor-photo-manipulator@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":191482},"main":"dist/plugin.cjs.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","module":"dist/esm/index.js","funding":[{"url":"https://github.com/sponsors/capawesome-team/","type":"github"},{"url":"https://opencollective.com/capawesome","type":"opencollective"}],"gitHead":"3e61f4b412f9f3f512c21169bb135bbb23a67e6d","scripts":{"fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","docgen":"docgen --api PhotoManipulatorPlugin --output-readme README.md --output-json dist/docs.json","eslint":"eslint . --ext ts","verify":"npm run verify:ios && npm run verify:android && npm run verify:web","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","verify:web":"npm run build","prepublishOnly":"npm run build","verify:android":"cd android && ./gradlew clean build test && cd ..","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd .."},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:18100cd9-7912-4a7d-9380-40f6d089ce39"}},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"repository":{"url":"git+https://github.com/capawesome-team/capacitor-plugins.git","type":"git"},"_npmVersion":"11.16.0","description":"Capacitor plugin for headless image transforms like crop, resize, rotate, flip and format conversion, including HEIC to JPEG, on Android, iOS, and Web.","directories":{},"_nodeVersion":"24.18.0","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.0","rimraf":"6.1.2","rollup":"4.53.3","swiftlint":"2.0.0","typescript":"5.9.3","@capacitor/cli":"8.0.0","@capacitor/ios":"8.0.0","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/android":"8.0.0","@ionic/eslint-config":"0.4.0","prettier-plugin-java":"2.6.7"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/capacitor-photo-manipulator_0.1.1_1784103030788_0.7999896066519354","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"_id":"@capawesome/capacitor-photo-manipulator@0.1.2","bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"dist":{"shasum":"419b7c97b0d6fcde0023441f344d7659e6af3f23","tarball":"https://registry.npmjs.org/@capawesome/capacitor-photo-manipulator/-/capacitor-photo-manipulator-0.1.2.tgz","fileCount":42,"integrity":"sha512-K173DLIl0G07YvFkRIMmDxYSPd695kxMIVAWnAH1llDnyBvtVnXYKYbiSVZAqT9Mj7v/mF0KAAH00C3EYbKCOw==","signatures":[{"sig":"MEYCIQDK8G6VqRK6rsG5zuXTxyBGTQM+HnALxnbhk2Qticq3/wIhALXiCLEwzCzlp+qfXG4EX8Wp8yGGZyJwypfsBdQLxnQB","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIB37q9o2f8xr96iBAZ+33s4gHukO+NHR49dEcR+qLGduAiAEyoKLp6ODgQ7++zLW78zXZy4tIUEdFMCqvUXSHVLbeQ=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@capawesome%2fcapacitor-photo-manipulator@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":191300},"main":"dist/plugin.cjs.js","name":"@capawesome/capacitor-photo-manipulator","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"module":"dist/esm/index.js","funding":[{"url":"https://github.com/sponsors/capawesome-team/","type":"github"},{"url":"https://opencollective.com/capawesome","type":"opencollective"}],"gitHead":"7c1937ed10b7de86ca2c1cdc3539a2735fd69a00","license":"MIT","scripts":{"fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","docgen":"docgen --api PhotoManipulatorPlugin --output-readme README.md --output-json dist/docs.json","eslint":"eslint . --ext ts","verify":"npm run verify:ios && npm run verify:android && npm run verify:web","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","verify:web":"npm run build","prepublishOnly":"npm run build","verify:android":"cd android && ./gradlew clean build test && cd ..","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd .."},"version":"0.1.2","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:18100cd9-7912-4a7d-9380-40f6d089ce39"}},"homepage":"https://capawesome.io/docs/sdks/capacitor/photo-manipulator/","keywords":["capacitor","plugin","native","photo manipulator","image manipulator","heic to jpeg","image resize","image crop","image convert","capacitor-plugin","image rotate","image flip","thumbnail","heic converter","avif to jpeg","image format conversion","strip exif"],"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"repository":{"url":"git+https://github.com/capawesome-team/capacitor-plugins.git","type":"git"},"_npmVersion":"11.17.0","description":"Capacitor plugin for headless image transforms like crop, resize, rotate, flip and format conversion, including HEIC to JPEG, on Android, iOS, and Web.","directories":{},"maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"_nodeVersion":"24.19.0","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.0","rimraf":"6.1.2","rollup":"4.62.3","swiftlint":"2.0.0","typescript":"5.9.3","@capacitor/cli":"8.4.2","@capacitor/ios":"8.0.0","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/android":"8.0.0","@ionic/eslint-config":"0.4.0","prettier-plugin-java":"2.9.7"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/capacitor-photo-manipulator_0.1.2_1788337584633_0.33392620376446813"}}},"time":{"created":"2026-07-07T18:36:16.561Z","modified":"2026-09-02T08:26:25.155Z","0.0.1":"2026-07-07T18:36:16.937Z","0.1.0":"2026-07-14T07:52:57.097Z","0.1.1":"2026-07-15T08:10:31.018Z","0.1.2":"2026-09-02T08:26:24.741Z"},"bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","homepage":"https://capawesome.io/docs/sdks/capacitor/photo-manipulator/","keywords":["capacitor","plugin","native","photo manipulator","image manipulator","heic to jpeg","image resize","image crop","image convert","capacitor-plugin","image rotate","image flip","thumbnail","heic converter","avif to jpeg","image format conversion","strip exif"],"repository":{"url":"git+https://github.com/capawesome-team/capacitor-plugins.git","type":"git"},"description":"Capacitor plugin for headless image transforms like crop, resize, rotate, flip and format conversion, including HEIC to JPEG, on Android, iOS, and Web.","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"readme":"# Capacitor Photo Manipulator Plugin\n\nCapacitor plugin for headless image transforms like crop, resize, rotate, flip and format conversion, including HEIC to JPEG.\n\n<div class=\"capawesome-z29o10a\">\n  <a href=\"https://cloud.capawesome.io/\" target=\"_blank\">\n    <img alt=\"Deliver Live Updates to your Capacitor app with Capawesome Cloud\" src=\"https://cloud.capawesome.io/assets/banners/cloud-build-and-deploy-capacitor-apps.png?t=1\" />\n  </a>\n</div>\n\n## Features\n\n- 🖼️ **Headless Transforms**: Crop, resize, rotate and flip images from code, without any UI.\n- 🔄 **HEIC to JPEG**: Convert HEIC and AVIF photos to JPEG, PNG or WebP with the native platform decoders. No WASM blobs, no WebView memory spikes.\n- 📐 **Upright Output**: The EXIF orientation is applied during decoding so the output is always upright.\n- 🧠 **Memory Efficient**: Bounds-aware downsampled decoding, so full-resolution bitmaps are never loaded when resizing.\n- 🕵️ **Privacy Friendly**: All metadata (e.g. EXIF, GPS) is stripped from the output by re-encoding.\n- 📂 **File Output**: Results are written to files, so even large images don't exhaust memory.\n- ℹ️ **Image Info**: Read the dimensions and format of an image without decoding the pixel data.\n- 🔒 **App Store safe**: Uses only official platform APIs.\n- 🤝 **Compatibility**: Works alongside the [Photo Editor](https://capawesome.io/docs/sdks/capacitor/photo-editor/), [Exif](https://capawesome.io/docs/sdks/capacitor/exif/) and [File Compressor](https://capawesome.io/docs/sdks/capacitor/file-compressor/) plugins.\n- 📦 **CocoaPods & SPM**: Supports CocoaPods and Swift Package Manager for iOS.\n- 🔁 **Up-to-date**: Always supports the latest Capacitor version.\n\nMissing a feature? Just [open an issue](https://github.com/capawesome-team/capacitor-plugins/issues) and we'll take a look!\n\n## Use Cases\n\nThe Photo Manipulator plugin is typically used whenever an app needs to process images from code, without any UI, for example:\n\n- **HEIC to JPEG conversion**: Convert photos taken on an iPhone to JPEG before uploading them, so servers and browsers can display them.\n- **Thumbnail generation**: Crop and resize images to small previews with memory-efficient downsampled decoding.\n- **Upload size reduction**: Resize images and re-encode them with a lower `quality` before uploading them to a server.\n- **Privacy-safe sharing**: Share images without metadata, since all metadata (e.g. EXIF, GPS) is stripped from the output by re-encoding.\n- **Orientation fixes**: Produce upright images, since the EXIF orientation is applied during decoding.\n\n## Compatibility\n\n| Plugin Version | Capacitor Version | Status         |\n| -------------- | ----------------- | -------------- |\n| 0.x.x          | >=8.x.x           | Active support |\n\n## Installation\n\nYou can use our **AI-Assisted Setup** to install the plugin.\nAdd the [Capawesome Skills](https://github.com/capawesome-team/skills) to your AI tool using the following command:\n\n```bash\nnpx skills add capawesome-team/skills --skill capacitor-plugins\n```\n\nThen use the following prompt:\n\n```\n Use the `capacitor-plugins` skill from `capawesome-team/skills` to install the `@capawesome/capacitor-photo-manipulator` plugin in my project.\n```\n\nIf you prefer **Manual Setup**, install the plugin by running the following commands and follow the platform-specific instructions below:\n\n```bash\nnpm install @capawesome/capacitor-photo-manipulator\nnpx cap sync\n```\n\n### Android\n\n#### Variables\n\nThis plugin will use the following project variables (defined in your app's `variables.gradle` file):\n\n- `$androidxExifInterfaceVersion` version of `androidx.exifinterface:exifinterface` (default: `1.4.1`)\n\n### iOS\n\nOn iOS, this plugin uses the [Image I/O](https://developer.apple.com/documentation/imageio) and [Core Graphics](https://developer.apple.com/documentation/coregraphics) frameworks. No additional configuration is required.\n\n### Web\n\nThis plugin provides a partial web implementation based on the [Canvas API](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API). HEIC and AVIF images can not be decoded by most browsers, which is exactly why the native implementations exist (see [Format Support](#format-support)).\n\n## Configuration\n\nNo configuration required for this plugin.\n\n## Usage\n\nThe following examples show how to convert an image to another format, create a thumbnail, and read the dimensions and format of an image.\n\nThe transformed image is written to a new file in the cache directory and deleted on the next app launch. Move it to a permanent location if you want to keep it, for example with the `rename(...)` method of the [Filesystem](https://capacitorjs.com/docs/apis/filesystem) plugin.\n\n### Convert a HEIC image to JPEG\n\nUse the `format` option of the `transform(...)` method to convert an image to another format, for example a HEIC photo taken on an iPhone to JPEG. The `quality` option controls the compression of the output file:\n\n```typescript\nimport { PhotoManipulator, ImageFormat } from '@capawesome/capacitor-photo-manipulator';\n\nconst convertHeicToJpeg = async () => {\n  // Convert an HEIC photo (e.g. taken on an iPhone) to JPEG\n  const { path } = await PhotoManipulator.transform({\n    path: 'file:///var/mobile/.../photo.heic',\n    format: ImageFormat.Jpeg,\n    quality: 0.9,\n  });\n  return path;\n};\n```\n\n### Create a thumbnail\n\nCombine the `crop`, `resize`, `rotate` and flip options in a single call. The operations are always applied in the fixed order crop → resize → rotate → flip:\n\n```typescript\nimport { PhotoManipulator } from '@capawesome/capacitor-photo-manipulator';\n\nconst createThumbnail = async () => {\n  // Crop, resize, rotate and flip in one call\n  const { path, width, height } = await PhotoManipulator.transform({\n    path: 'file:///var/mobile/.../photo.jpeg',\n    crop: { x: 100, y: 100, width: 1080, height: 1080 },\n    resize: { width: 256 },\n    rotate: 90,\n    flipHorizontal: true,\n  });\n  return { path, width, height };\n};\n```\n\n### Read the dimensions and format of an image\n\nUse the `getInfo(...)` method to read the dimensions and format of an image without decoding the pixel data where possible:\n\n```typescript\nimport { PhotoManipulator } from '@capawesome/capacitor-photo-manipulator';\n\nconst getInfo = async () => {\n  const { width, height, format } = await PhotoManipulator.getInfo({\n    path: 'file:///var/mobile/.../photo.heic',\n  });\n  return { width, height, format };\n};\n```\n\n## API\n\n<docgen-index>\n\n* [`getInfo(...)`](#getinfo)\n* [`transform(...)`](#transform)\n* [Interfaces](#interfaces)\n* [Enums](#enums)\n\n</docgen-index>\n\n<docgen-api>\n<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->\n\n### getInfo(...)\n\n```typescript\ngetInfo(options: GetInfoOptions) => Promise<GetInfoResult>\n```\n\nGet the dimensions and format of an image without decoding\nthe pixel data where possible.\n\n| Param         | Type                                                      |\n| ------------- | --------------------------------------------------------- |\n| **`options`** | <code><a href=\"#getinfooptions\">GetInfoOptions</a></code> |\n\n**Returns:** <code>Promise&lt;<a href=\"#getinforesult\">GetInfoResult</a>&gt;</code>\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### transform(...)\n\n```typescript\ntransform(options: TransformOptions) => Promise<TransformResult>\n```\n\nApply one or more transformations to an image and write the\nresult to a new file.\n\nThe operations are always applied in the following fixed order:\ncrop → resize → rotate → flip. Chain multiple calls if you need\na different order.\n\nThe EXIF orientation of the source image is applied during decoding\nso that the output is always upright. All other metadata (e.g. EXIF,\nGPS) is stripped by re-encoding.\n\n| Param         | Type                                                          |\n| ------------- | ------------------------------------------------------------- |\n| **`options`** | <code><a href=\"#transformoptions\">TransformOptions</a></code> |\n\n**Returns:** <code>Promise&lt;<a href=\"#transformresult\">TransformResult</a>&gt;</code>\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### Interfaces\n\n\n#### GetInfoResult\n\n| Prop         | Type                        | Description                                                                                                                                                                                                                                | Since |\n| ------------ | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----- |\n| **`format`** | <code>string \\| null</code> | The format of the image or `null` if the format could not be determined. The value is provided by the platform decoder and may differ slightly between platforms for the same file (e.g. `heic` on iOS and the web but `heif` on Android). | 0.1.0 |\n| **`height`** | <code>number</code>         | The height of the image in pixels after the EXIF orientation has been applied.                                                                                                                                                             | 0.1.0 |\n| **`width`**  | <code>number</code>         | The width of the image in pixels after the EXIF orientation has been applied.                                                                                                                                                              | 0.1.0 |\n\n\n#### GetInfoOptions\n\n| Prop       | Type                | Description                                                                                                                                                                             | Since |\n| ---------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |\n| **`path`** | <code>string</code> | The path of the image file. On Android and iOS, only local file paths and `file://` URIs are supported. On the web, any fetchable URL (e.g. `https://`, `blob:`, `data:`) is supported. | 0.1.0 |\n\n\n#### TransformResult\n\n| Prop         | Type                | Description                                                                                                                                                                                                                              | Since |\n| ------------ | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |\n| **`height`** | <code>number</code> | The height of the transformed image in pixels.                                                                                                                                                                                           | 0.1.0 |\n| **`path`**   | <code>string</code> | The path of the transformed image file. On Android and iOS, the file is stored in the cache directory and deleted on the next app launch. Move it to a permanent location if you want to keep it. On the web, the path is an object URL. | 0.1.0 |\n| **`width`**  | <code>number</code> | The width of the transformed image in pixels.                                                                                                                                                                                            | 0.1.0 |\n\n\n#### TransformOptions\n\n| Prop                 | Type                                                    | Description                                                                                                                                                                                          | Default                       | Since |\n| -------------------- | ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- | ----- |\n| **`crop`**           | <code><a href=\"#cropoptions\">CropOptions</a></code>     | The region of the source image to crop to, in source pixels. The region must be within the bounds of the source image.                                                                               |                               | 0.1.0 |\n| **`flipHorizontal`** | <code>boolean</code>                                    | Whether or not to flip the image horizontally.                                                                                                                                                       | <code>false</code>            | 0.1.0 |\n| **`flipVertical`**   | <code>boolean</code>                                    | Whether or not to flip the image vertically.                                                                                                                                                         | <code>false</code>            | 0.1.0 |\n| **`format`**         | <code><a href=\"#imageformat\">ImageFormat</a></code>     | The format of the output file. On iOS, <a href=\"#imageformat\">`ImageFormat.Webp`</a> is not supported and rejects with the `UNSUPPORTED_FORMAT` error code.                                          | <code>ImageFormat.Jpeg</code> | 0.1.0 |\n| **`path`**           | <code>string</code>                                     | The path of the image file to transform. On Android and iOS, only local file paths and `file://` URIs are supported. On the web, any fetchable URL (e.g. `https://`, `blob:`, `data:`) is supported. |                               | 0.1.0 |\n| **`quality`**        | <code>number</code>                                     | The quality of the output file between `0` and `1`. Only applied when `format` is <a href=\"#imageformat\">`ImageFormat.Jpeg`</a> or <a href=\"#imageformat\">`ImageFormat.Webp`</a>.                    | <code>0.9</code>              | 0.1.0 |\n| **`resize`**         | <code><a href=\"#resizeoptions\">ResizeOptions</a></code> | The target size to resize the image to, in pixels. If only one of `width` and `height` is provided, the aspect ratio is preserved. The resize is applied after the crop.                             |                               | 0.1.0 |\n| **`rotate`**         | <code>number</code>                                     | The clockwise angle to rotate the image by, in degrees. Must be `90`, `180` or `270`.                                                                                                                | <code>0</code>                | 0.1.0 |\n\n\n#### CropOptions\n\n| Prop         | Type                | Description                                                                                          | Since |\n| ------------ | ------------------- | ---------------------------------------------------------------------------------------------------- | ----- |\n| **`height`** | <code>number</code> | The height of the crop region in pixels.                                                             | 0.1.0 |\n| **`width`**  | <code>number</code> | The width of the crop region in pixels.                                                              | 0.1.0 |\n| **`x`**      | <code>number</code> | The horizontal offset of the crop region in pixels, measured from the left edge of the source image. | 0.1.0 |\n| **`y`**      | <code>number</code> | The vertical offset of the crop region in pixels, measured from the top edge of the source image.    | 0.1.0 |\n\n\n#### ResizeOptions\n\n| Prop         | Type                | Description                                                                                                  | Since |\n| ------------ | ------------------- | ------------------------------------------------------------------------------------------------------------ | ----- |\n| **`height`** | <code>number</code> | The target height in pixels. If only one of `width` and `height` is provided, the aspect ratio is preserved. | 0.1.0 |\n| **`width`**  | <code>number</code> | The target width in pixels. If only one of `width` and `height` is provided, the aspect ratio is preserved.  | 0.1.0 |\n\n\n### Enums\n\n\n#### ImageFormat\n\n| Members    | Value               | Description                                             | Since |\n| ---------- | ------------------- | ------------------------------------------------------- | ----- |\n| **`Jpeg`** | <code>'JPEG'</code> | JPEG (`image/jpeg`).                                    | 0.1.0 |\n| **`Png`**  | <code>'PNG'</code>  | PNG (`image/png`).                                      | 0.1.0 |\n| **`Webp`** | <code>'WEBP'</code> | WebP (`image/webp`). Only available on Android and Web. | 0.1.0 |\n\n</docgen-api>\n\n## Format Support\n\nThe formats an image can be decoded from and encoded to depend on the platform:\n\n### Input (Decode)\n\n| Format    | Android          | iOS          | Web               |\n| --------- | ---------------- | ------------ | ----------------- |\n| JPEG      | ✅               | ✅           | ✅                |\n| PNG       | ✅               | ✅           | ✅                |\n| WebP      | ✅               | ✅           | ✅                |\n| GIF       | ✅               | ✅           | ✅                |\n| BMP       | ✅               | ✅           | ✅                |\n| HEIC/HEIF | ✅ (Android 9+)  | ✅           | ❌                |\n| AVIF      | ✅ (Android 12+) | ✅ (iOS 16+) | Browser-dependent |\n\n### Output (Encode)\n\n| Format | Android | iOS | Web               |\n| ------ | ------- | --- | ----------------- |\n| JPEG   | ✅      | ✅  | ✅                |\n| PNG    | ✅      | ✅  | ✅                |\n| WebP   | ✅      | ❌  | Browser-dependent |\n\nIf an image can not be decoded or encoded on the current platform, the call is rejected with the `UNSUPPORTED_FORMAT` error code so you can fall back gracefully.\n\n## Memory\n\nThis plugin is designed to keep the memory footprint low, even for very large images:\n\n- When a `resize` target is provided, the image is decoded downsampled (using `inSampleSize` on Android and `kCGImageSourceThumbnailMaxPixelSize` on iOS) so the full-resolution bitmap is never loaded into memory.\n- Transforms are processed one at a time on a background queue.\n- The result is written to a file instead of being returned as base64 data.\n\nFor the smallest possible memory footprint, always provide a `resize` target if you don't need the full resolution.\n\n## Metadata\n\nThe EXIF orientation of the source image is applied during decoding so that the output is always upright. All other metadata (e.g. EXIF, GPS) is stripped by re-encoding. Use the [Exif](https://capawesome.io/docs/sdks/capacitor/exif/) plugin if you want to read the metadata of the source image and write it back to the transformed image.\n\n## FAQ\n\n### How is this plugin different from other similar plugins?\n\nIt performs headless image transforms — crop, resize, rotate, flip and format conversion, including HEIC and AVIF to JPEG, PNG or WebP — using the native platform decoders, with no UI and no WebView memory spikes. It decodes bounds-aware and downsampled so full-resolution bitmaps are never loaded when resizing, applies the EXIF orientation for always-upright output, writes results to files, and strips metadata on re-encode for privacy-safe sharing. It works on Android, iOS and the Web, uses only official platform APIs, and is fully typed and kept current with the latest Capacitor version.\n\n### In which order are the transformations applied?\n\nThe operations are always applied in the following fixed order: crop → resize → rotate → flip. If you need a different order, chain multiple `transform(...)` calls, passing the output path of one call as the input path of the next.\n\n### Why does the transformed image disappear after an app restart?\n\nOn Android and iOS, the transformed image is written to a new file in the cache directory and deleted on the next app launch. Move it to a permanent location if you want to keep it, for example with the `rename(...)` method of the official [Filesystem](https://capacitorjs.com/docs/apis/filesystem) plugin.\n\n### Does the plugin preserve the EXIF metadata of the source image?\n\nNo, the EXIF orientation is applied during decoding so that the output is always upright, and all other metadata (e.g. EXIF, GPS) is stripped from the output by re-encoding. This is privacy-friendly by default. If you want to keep the metadata, use the [Exif](https://capawesome.io/docs/sdks/capacitor/exif/) plugin to read it from the source image and write it back to the transformed image.\n\n### Why does converting to WebP fail on iOS?\n\nOn iOS, `ImageFormat.Webp` is not supported as an output format and the call rejects with the `UNSUPPORTED_FORMAT` error code. WebP output is only available on Android and the Web. Use `ImageFormat.Jpeg` or `ImageFormat.Png` as a cross-platform alternative.\n\n### Why can't I convert HEIC or AVIF images on the Web?\n\nThe web implementation is based on the Canvas API, and most browsers cannot decode HEIC and AVIF images. This is exactly why the native implementations exist: on Android (9+ for HEIC/HEIF, 12+ for AVIF) and iOS (16+ for AVIF), the plugin uses the native platform decoders. See the [Format Support](#format-support) section for the complete overview.\n\n### How does the plugin handle very large images?\n\nThe plugin is designed to keep the memory footprint low. When a `resize` target is provided, the image is decoded downsampled so the full-resolution bitmap is never loaded into memory, transforms are processed one at a time on a background queue, and the result is written to a file instead of being returned as base64 data. For the smallest possible memory footprint, always provide a `resize` target if you don't need the full resolution.\n\n## Related Plugins\n\n- [Exif](https://capawesome.io/docs/sdks/capacitor/exif/): Read, write and remove EXIF metadata from image files.\n- [File Compressor](https://capawesome.io/docs/sdks/capacitor/file-compressor/): Compress files with support for image formats like PNG, JPEG, and WebP.\n- [File Picker](https://capawesome.io/docs/sdks/capacitor/file-picker/): Let the user select the images to transform from the gallery or file system.\n- [Photo Editor](https://capawesome.io/docs/sdks/capacitor/photo-editor/): Let the user edit a photo in an installed photo editing app.\n\n## Newsletter\n\nStay up to date with the latest news and updates about the Capawesome, Capacitor, and Ionic ecosystem by subscribing to our [Capawesome Newsletter](https://cloud.capawesome.io/newsletter/).\n\n## Changelog\n\nSee [CHANGELOG.md](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/photo-manipulator/CHANGELOG.md).\n\n## License\n\nSee [LICENSE](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/photo-manipulator/LICENSE).\n","readmeFilename":"README.md"}