How to Resize Images in Your Expo App

DavidDavid November 12, 2026 7 min read
Printed photographs of different sizes spread across a light oak table, one being trimmed in a vintage brass paper cutter next to a steel ruler and a smartphone, in bright morning window light
Original image, App Store Launch Club

How to resize images in your Expo app, in short

Install expo-image-manipulator. Open the image with ImageManipulator.manipulate(uri), which gives you a context. Chain the changes you want on that context, for example .resize({ width: 800 }). Then await context.renderAsync() to get the finished image, and await saveAsync on it with a format and a compress value. The result has a uri for the new file plus its width and height.

The most common reason to do this is uploads. A photo straight from the camera or the photo library is far bigger than an avatar, a feed thumbnail or a receipt scan needs to be. Shrinking it on the phone first means faster uploads, smaller storage bills and screens that load quicker.

expo-image-manipulator at a glance (SDK 58)

QuestionAnswer
Installnpx expo install expo-image-manipulator
PlatformsAndroid, iOS, tvOS, Web
Works in Expo Go?Yes
Open an imageImageManipulator.manipulate(uri) in a function, or useImageManipulator(uri) in a component
Editsresize, crop, rotate, flip, plus extent on web only
FinishrenderAsync(), then saveAsync({ format, compress, base64 })
Output formatsJPEG (default), PNG, WEBP
Old APImanipulateAsync, deprecated

Step 1: Install expo-image-manipulator

Run npx expo install expo-image-manipulator. On SDK 58 that installs the 58.0.x line. Use npx expo install rather than a plain npm install so the version matches your SDK.

The module is included in Expo Go, so you can try it on your phone straight away, and it needs no permission and no config plugin. It only works on images that are already on the device, so it usually sits right after an [image picker](/blog/how-to-add-an-image-picker-to-your-expo-app) or a [camera](/blog/how-to-add-a-camera-to-your-expo-app) in your flow.

Step 2: Resize with the new contextual API

Import ImageManipulator and SaveFormat from expo-image-manipulator. In a helper function, create a context with ImageManipulator.manipulate(uri), call resize on it, then render and save. In words: const context = ImageManipulator.manipulate(uri); context.resize({ width: 800 }); const image = await context.renderAsync(); const result = await image.saveAsync({ format: SaveFormat.JPEG, compress: 0.8 }). Use result.uri from there on.

The chainable methods on the context are synchronous. They only schedule the work on a background thread. Nothing is finished until renderAsync resolves, so always await it before you save or read the size.

What each edit does

MethodWhat it doesWatch out for
resize({ width, height })Scales the image to the given sizePass only width or only height and the other is calculated to keep the aspect ratio
crop({ originX, originY, width, height })Cuts out a rectangle starting at its top-left cornerWork out the numbers against the image size at that point in the chain
rotate(degrees)Rotates the imagePositive is clockwise, negative is counter-clockwise
flip('vertical' or 'horizontal')Mirrors the image on one axisOne axis per call. For both, chain two flips
extent({ ... })Changes the canvas size and offset, filling empty space with a background colorWeb only
reset()Throws away scheduled edits and goes back to the loaded imageUseful for an undo button in an editor screen

Edits run in the order you chain them, so rotate then crop is not the same as crop then rotate. If you are building a small editor screen inside a component, the useImageManipulator(uri) hook gives you the same context tied to that source, which is handy for buttons like rotate and flip.

Step 3: Stop huge photos from crashing your app

Modern phone cameras produce photos with very high resolution. If you decode one at full size just to shrink it to a thumbnail, you spend a lot of memory for nothing, and on a busy device that can end in an out-of-memory crash.

manipulate and useImageManipulator take a second argument for exactly this: ImageLoadOptions with maxWidth and maxHeight. When you set them, the image is downsampled while it decodes, preserving its aspect ratio, so the full-size image is never loaded into memory. If you already know you want an image no wider than your target size, pass maxWidth when you open it, for example ImageManipulator.manipulate(uri, { maxWidth: 1600 }), then resize to the exact size you want.

Step 4: Pick the format and compression

saveAsync takes three options. format is SaveFormat.JPEG, SaveFormat.PNG or SaveFormat.WEBP, and it defaults to JPEG. compress is a number from 0 to 1, where 1 means no compression and the highest quality, and 0 means the most compression and the lowest quality. base64 set to true also returns the image data as a base64 string.

Which format to save as

You are savingUseWhy
Photos for avatars, feeds, uploadsJPEG with compress below 1Fast and small. JPEG is lossy, so check the result by eye before you lower compress further
Screenshots, logos, anything with sharp edges or transparencyPNGLossless, at the cost of being slower and bigger
Images only your own app or backend will readWEBPAvailable as a save format. Check that whatever reads the file supports it

There is no single correct compress value. Save a few real photos at a couple of settings, look at them on a phone at the size your app shows them, and pick the lowest one that still looks right.

Skip base64 unless your storage API needs it. It puts the whole image in memory as a string, which is exactly what you were trying to avoid. Upload from result.uri instead.

Step 5: Upload the result, not the original

saveAsync writes the new image to the app's cache directory. That is perfect for an upload step and wrong for long-term storage, because cache files are not a permanent address. The order that works in practice:

  1. Pick or capture the photo and show a preview from its uri right away.
  2. Open it with manipulate, passing maxWidth or maxHeight, resize to your display size, render and save as JPEG.
  3. Upload result.uri to your storage, for example [Supabase Storage](/blog/how-to-set-up-supabase-with-expo).
  4. Save the stored file's path or URL in your database, never the local cache uri.
  5. Keep the picked image in state until the upload succeeds, so a failed upload can be retried without picking again.

If the user wants to keep the edited image on their phone instead, save it to their photos with the media library. Our guide to [saving photos to the camera roll](/blog/how-to-save-photos-to-the-camera-roll-in-your-expo-app) covers that, including the permission prompt.

Have Claude Code build it for you

Open your project in the Claude Code desktop app and describe the result you want. Left alone, AI-written code for this tends to use the deprecated manipulateAsync, decode full-size photos, forget to await renderAsync, upload base64 strings, or store the cache uri in the database. A prompt that heads those off:

Then add a line to your [CLAUDE.md](/blog/claude-md-for-expo-apps) such as "Images: use ImageManipulator.manipulate with maxWidth, never manipulateAsync, always resize before upload" so later sessions keep the same rules. Smaller uploads also help if you are working on [reducing your app size](/blog/how-to-reduce-your-expo-app-size) and overall speed.

The short version

To resize images in your Expo app: install expo-image-manipulator, open the image with ImageManipulator.manipulate(uri, { maxWidth }), chain resize and any crop, rotate or flip, await renderAsync, then saveAsync as JPEG with a compress value you have checked by eye. Upload result.uri, store the remote URL, and keep manipulateAsync out of new code.

If you are building your first iOS app with Claude Code and Expo and want feedback on it before App Review, bring it to App Store Launch Club. Members share their builds and help each other get unstuck, and the [curriculum](/curriculum) covers the full path from first build to first users. If photos are part of your app, our guide to [adding an image picker](/blog/how-to-add-an-image-picker-to-your-expo-app) pairs well with this one. Join at applaunchclub.co for $9 a month.

Free app-building tips, straight to your inbox

Short, practical drops on app ideas, validating fast, store listings, and passing app review. No spam, unsubscribe anytime.

Frequently asked questions

How do I resize an image in Expo?

Install expo-image-manipulator with npx expo install expo-image-manipulator. Call ImageManipulator.manipulate(uri), chain .resize({ width }), await renderAsync(), then await saveAsync({ format: SaveFormat.JPEG, compress }) on the result. The returned object has the new uri, width and height.

Is manipulateAsync deprecated in Expo?

Yes. ImageManipulator.manipulateAsync has been replaced by the contextual API. Use ImageManipulator.manipulate in functions or the useImageManipulator hook in components.

How do I keep the aspect ratio when resizing?

Pass only one dimension to resize, for example { width: 800 }. The other dimension is calculated automatically to preserve the image's aspect ratio.

Why does my Expo app run out of memory when editing photos?

Full-resolution camera photos take a lot of memory to decode. Pass maxWidth or maxHeight as the second argument to manipulate or useImageManipulator so the image is downsampled while decoding and never loaded at full size.

Where does saveAsync save the image?

In the app's cache directory. Treat that file as temporary: upload it or save it to the user's photos, and store the remote URL rather than the local uri.

Does expo-image-manipulator work in Expo Go?

Yes. It is included in Expo Go and runs on Android, iOS, tvOS and web, with no permissions or config plugin needed. The extent operation is web only.

Last reviewed by David on November 12, 2026

David

Written by

David

Founder and app builder

Keep reading

ExpoClaude Code

How to Add Notification Actions to Your Expo App

To add notification actions to an Expo app, register a category with Notifications.setNotificationCategoryAsync, give it action buttons (and optionally a text reply), set categoryIdentifier on the notification, then read response.actionIdentifier in a response listener. Here is every action option, how to handle taps when the app was closed, the Android and iOS differences, and a Claude Code prompt that wires it all up.

David 8 min
Read article
ExpoClaude Code

How to Schedule Local Notifications in Your Expo App

To schedule local notifications in an Expo app, install expo-notifications, set a notification handler, ask for permission, create an Android channel, then call scheduleNotificationAsync with your content and a trigger like DAILY, WEEKLY or DATE. Here is every trigger type, how to cancel and list what is scheduled, why Android reminders arrive late, and a Claude Code prompt that builds the whole reminder flow.

David 8 min
Read article

Ready to build it yourself?

Join App Store Launch Club, the #1 community for building and launching apps, for $9/month.

← Back to the blog