# Capacitor Camera Plugin ignores targetWidth/targetHeight options

**URL:** <https://forum.ionicframework.com/t/capacitor-camera-plugin-ignores-targetwidth-targetheight-options/251810>\
**Category:** Capacitor\
**Created:** [August 4, 2026, 9:00pm UTC](https://forum.ionicframework.com/t/capacitor-camera-plugin-ignores-targetwidth-targetheight-options/251810 "2026-08-04T21:00:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johanson](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@Johanson](https://forum.ionicframework.com/u/Johanson)\
**Post date:** [August 4, 2026, 9:00pm UTC](https://forum.ionicframework.com/t/capacitor-camera-plugin-ignores-targetwidth-targetheight-options/251810/1 "2026-08-04T21:00:40Z")

</div>

I have been using the Capacitor camera plugin to take photos in our mobile app for many years and it has been working well. Recently, the developers of the camera plugin deprecated the `Camera.getPhoto` method and replaced it with the new `Camera.takePhoto` method. Ok fine, but the the new takePhoto method just ignores the new targetWidth and targetHeight options.

My new code using the takePhoto method is very simple:

```auto
const imageResult: MediaResult = await Camera.takePhoto({
		quality: 80,
		editable: "no",
		includeMetadata: true,
		cameraDirection: CameraDirection.Rear,
		correctOrientation: true,
		targetWidth: 1024,
		targetHeight: 768
	})

```

From a native Android app, there are 2 ways to get the JPEG image data as a base-64 string. You can either access `imageResult.thumbnail` for a thumbnail of the image, or you can read the image file data using the path `imageResult.uri`. However, neither of these options result in an image that is 1024x768.

Directly accessing the image data from `imageResult.thumbnail` gives you a resolution of 576x768, which makes sense for a thumbnail.

Alternative, reading the file URI with the following code:

```auto
const fileResult: ReadFileResult = await Filesystem.readFile({ path: imageResult.uri })

```

And then getting the image data from `fileResult.data` gives you a resolution of 3456x4608, which is the phone camera’s maximum resolution.

What am I doing wrong? How can I get the new `Camera.takePhoto` method to honor the resolution of 1024x768 that I’m requesting?

---

<div class="post-metadata">

**Author:** ![riderx](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/riderx/32/149090_2.png) [@riderx](https://forum.ionicframework.com/u/riderx)\
**Post date:** [August 26, 2026, 12:57pm UTC](https://forum.ionicframework.com/t/capacitor-camera-plugin-ignores-targetwidth-targetheight-options/251810/2 "2026-08-26T12:57:21Z")

</div>

This plugin has many problem and honestly it’s very hard problems.  
we fixed most of them in this fork (we got pay to do so)

> **[GitHub - Cap-go/capacitor-camera-preview: Capacitor plugin that allows camera interaction...](https://github.com/Cap-go/capacitor-camera-preview)**
>
> Capacitor plugin that allows camera interaction from Javascript and HTML
