# App Keeps Crashing when resizing Image

**URL:** <https://forums.fusetools.com/t/app-keeps-crashing-when-resizing-image/4162>\
**Category:** How-to Discussions\
**Created:** [March 20, 2018, 3:03am UTC](https://forums.fusetools.com/t/app-keeps-crashing-when-resizing-image/4162 "2018-03-20T03:03:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Mike](https://forums.fusetools.com/u/Mike)\
**Post date:** [March 20, 2018, 3:03am UTC](https://forums.fusetools.com/t/app-keeps-crashing-when-resizing-image/4162/1 "2018-03-20T03:03:10Z")

</div>

My app keeps crashing when using ImageTools to resize my image in the following function before I create a base64 out if it. Been stuck on this for awhile. I get a SIGABRT error in Xcode as well. Any help is appreciated!

```auto
function capturePhoto() {
	Camera.capturePhoto()
		.then(function (photo) {

			var options = {
			    mode: ImageTools.IGNORE_ASPECT,
			    desiredWidth: 320, //The desired width in pixels
			    desiredHeight: 240 //The desired height in pixels
			};

			ImageTools.resize(photo, options)
			    .then(function(newImage) { console.log("Path of resized image is " + newImage.path); });

			
			photo.save()
				.then(function(filePath) {
					console.log("Photo saved to: " + filePath);

							

					arrayBuff = FileSystem.readBufferFromFileSync(filePath);
					b64data = Base64.encodeBuffer(arrayBuff); // send this to the backend
					photo.release();
				})
				.catch(function(error) {
					console.log("Failed to save photo: " + error);
					photo.release();
				});
		})
		.catch(function (error) {
			console.log("Failed to capture photo: " + error);
		});
}

```

---

<div class="post-metadata">

**Author:** ![Giako](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/giako/32/756_2.png) [@Giako](https://forums.fusetools.com/u/Giako)\
**Post date:** [August 8, 2018, 9:52am UTC](https://forums.fusetools.com/t/app-keeps-crashing-when-resizing-image/4162/2 "2018-08-08T09:52:55Z")

</div>

I have the same issue, too.

---

<div class="post-metadata">

**Author:** ![Ahmed\_Diab](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/ahmed_diab/32/692_2.png) [@Ahmed\_Diab](https://forums.fusetools.com/u/Ahmed_Diab)\
**Post date:** [August 23, 2018, 10:10pm UTC](https://forums.fusetools.com/t/app-keeps-crashing-when-resizing-image/4162/4 "2018-08-23T22:10:02Z")

</div>

I will WalkThrough this problem i’m already fixed it on my apps by crafting new way to resize, because this resize method consumes the memory at all
