Articles · App ExamplesUpdated September 2026

Add image cropping to an app in an afternoon, or in a week.

To add image cropping to an app, switch on the editing option in the image picker you already use and the operating system draws the crop box for you. That is one flag on top of adding photo upload, and for square profile pictures it is the entire job. The catch arrives straight away: on iOS the system crop rectangle is always a square, so a 16:9 banner crop or a free-form crop on iPhone means building your own crop surface.

This page covers what the built-in editor gives you on each platform, what cropping before upload is worth in storage and in bandwidth, when you have to build the crop box yourself, and why an avatar, a banner and a scanned receipt all want a different crop.

Run the numbers on your own uploads

The short version

The crop is one flag, the crop box is the project.

Cropping an image is a rectangle and a resample. Every mobile platform ships that. What costs time is the surface the user drags: pinch to zoom, a grid overlay, a locked ratio, a rotate handle, and an undo that behaves. The system picker hands you a plain version of all that for nothing, and takes the design decisions away in exchange.

So the real question is not how to crop. It is whether the square box the operating system offers is good enough for what you are shipping. For profile pictures it usually is. For anything where the frame is part of the content, it usually is not, and you should know that before you promise a date.

What the system picker gives you, and what it refuses

If your app already opens the photo library or the camera, cropping is one option away. The Expo image picker exposes an editing flag that shows a UI for editing the image after it is picked. On Android the user can crop and rotate. On iOS they can crop only. Rotation being an Android-only affordance catches out anyone who tested on one platform and wrote the release notes from that.

The ratio limit is the one to design around. The picker accepts an aspect pair, but the documentation is explicit that this applies on Android only, because on iOS the crop rectangle is always a square. No option unlocks a 4:5 or 16:9 box in the iOS system editor. If your layout needs one, the system editor is out and no amount of configuration will bring it back.

Two more limits before you promise anything. Editing is mutually exclusive with multiple selection, so you cannot let somebody pick six photos and crop them in one pass. And the quality setting is not a guarantee: the docs warn that if the chosen image was already compressed, the output file can come out larger than the original. On iOS the quality value is ignored outright for a .bmp or .png picked from the library.

The docs also flag an iOS bug with high resolution images from the camera roll, where the crop rectangle values come back wrong because of the underlying system picker rather than anything in your code. Test with a full resolution photo from a real camera roll, not a screenshot, before you decide the flow works.

Expo, ImagePicker API reference

What cropping before upload is actually worth

Cropping on the device before upload changes three things: how long the upload takes on a phone network, how much you store, and how much you serve. The bandwidth argument is the strong one. The storage argument is weaker than it sounds, and it is worth doing the arithmetic rather than repeating the claim.

Take a published price. Cloudflare R2 standard storage is $0.015 per GB-month, the first 10 GB-month each month is free, and egress to the internet is not charged. Say your app takes 5,000 uploads a month. Measure your own files rather than guessing, but assume for now an original at 3 MB and a cropped, resized version at 300 KB.

Uncropped, that adds 15 GB every month. The free allowance is gone in month one, and by month twelve the bucket holds 180 GB and bills about $2.55 for that month alone. Summed across the first year it comes to roughly $15.75. Cropped, it adds 1.5 GB a month, stays inside the free allowance until month seven, and the whole first year costs about $0.38. The saving is real and it is about fifteen dollars. Write operations are noise at this size: 5,000 uploads sit well inside the million free write requests a month. Note that this provider does not bill egress, so on one that does, the serving side scales with file size too and you should check its own page.

Fifteen dollars a year is not why you crop. Upload time is. A 3 MB file on a weak mobile connection is the difference between a form that submits and a user who closes the app. Decide the crop on the experience, then check the storage line instead of assuming it. Whether you also keep the untouched original next to the crop is a schema decision, and it belongs with what gets stored.

Cloudflare R2 pricing

Try it

What cropping before upload actually saves

Storage at $0.015 per GB-month with the first 10 GB-month free, summed across twelve months as the bucket fills. Measure your own files.

$15.02 saved in year one

Uncropped runs about $15.34 over twelve months against $0.32 cropped. The bigger win is the 13.2 GB a month your users no longer push through a phone network.

When you have to build the crop box yourself

The moment you need a ratio other than square on iOS, or a rotate handle, or a crop preview that matches the frame the photo will sit in, you are building a crop surface. It is a smaller job than it looks and a longer one than it sounds.

The parts are a preview that scales the image to fit, a rectangle the user drags that stays inside the image bounds, a pinch and pan pair, an optional ratio lock, and then the transform itself. The transform is a library call in most stacks: you give a top left corner plus a width and height, then resize and re-encode at a compression value you pick. The gesture layer is where the days go, because people judge a crop box by how it feels under a thumb.

The trap is memory. A photo is compressed on disk and uncompressed once decoded, at roughly four bytes per pixel, so a 4000 by 3000 image is about 48 MB in RAM before you have drawn anything. Hold two or three of those while a user drags a box and a mid-range Android phone will kill the screen. Preview from a downscaled copy, apply the final transform to the original once, and release what you are done with. That is standard app performance discipline rather than anything specific to cropping.

An avatar, a banner and a receipt want different crops

Cropping is not one feature. What the user is cropping decides the interface, and shipping a single crop screen for every case is why crop features so often feel wrong.

An avatar wants a fixed square or circle, a tight zoom, and no way to get it wrong. The system editor fits that exactly, and this is usually the crop people mean when they add user profiles. A banner or a listing photo wants a ratio locked to the slot it will render in, so the crop is really a framing tool and the preview should show the real frame, not a bare rectangle. A scanned document wants four draggable corners and a perspective correction, which is a different feature wearing the same word.

Pick which of the three you are building before you pick an approach. The square system editor answers the first case completely, the second case not at all, and the third case is not cropping in the first place.

Four ways to get a cropped image, and one way to avoid it

ApproachRatios other than square on iOSRotate and straightenWorks with no networkWhat it costs you
System picker editing flagNoAndroid onlyYesone option
Open source crop componentYesdepends on the componentYesa screen to wire up
Your own gesture crop surfaceYesYesYesdays, plus memory tuning
Crop on the server after uploadYesYesNothe full file over the network first
No crop, store the originalNoNoYesnothing now, layout problems later

Build the flow, not the crop

Cropping is rarely the project. It is one screen inside a flow that starts at a camera button and ends with a stored file and a thumbnail somewhere else. Most of the work sits either side of the crop: the permission prompt, the picker, an upload that retries, a progress state, and what the list looks like while the picture is still going up.

Newly is an AI app builder. You describe the app in plain English and it writes a real React Native and Expo project you own, runs it on a cloud iPhone or Android simulator while it builds, and ships to TestFlight and to Google Play internal testing. It is $25 a month with no free plan, the code comes out as a ZIP or through two-way GitHub sync, and iOS releases need your own Apple Developer account. It does not choose your storage provider, which stays your call.

Ask for the flow rather than the widget. A prompt that says users pick a photo, crop it to a square and see it on their profile within a second gets you something you can run on a phone. Then you argue with the crop box while holding it, which is the only way that argument ever resolves.

Questions people ask about cropping images in an app

Switch on the editing option in whichever image picker you already use. The operating system then shows its own crop UI after the photo is chosen and hands your code back the cropped file. For a square crop that is the whole change. Anything else, including a fixed non-square ratio on iOS, means installing or building a crop surface of your own.

Describe the photo flow, not just the crop

Write down where the photo comes from, what shape it has to end up, and where it will be shown, then build the screen around that.

Start building