Updated March 8, 2026

By Jack Smith, iOS Developer at DB Labs

iOS Tips

iPhone Photo File Names: IMG_ Numbers Explained

Every photo on your iPhone has a name like IMG_4827.HEIC. Where do those numbers come from? Why do they sometimes repeat? And what is the DCIM folder you see when you plug your iPhone into a computer? Here is the complete explanation.

The Short Answer

iPhone names photos using the DCF (Design Rule for Camera File System) standard — the same naming convention used by virtually every digital camera since the early 2000s. Files are named IMG_ followed by a 4-digit sequential number (IMG_0001 through IMG_9999), stored inside numbered folders (100APPLE, 101APPLE, etc.) inside a DCIM directory. The numbers are sequential on each device and reset after IMG_9999 by creating a new folder. There is no deeper meaning to the specific number — it is simply a counter of how many photos that iPhone has taken since its last reset.

The DCF Standard: Why IMG_?

The "IMG_" prefix and four-digit numbering system comes from the DCF standard (Design Rule for Camera File System), published by JEITA (Japan Electronics and Information Technology Industries Association) as JEITA CP-3461. It was established in 1998 and revised in 2003.

DCF was created to ensure interoperability — a photo taken by any digital camera should be readable by any computer or card reader without proprietary software. The standard specifies:

  • Photo files must be stored in a root DCIM directory
  • DCIM must contain numbered subdirectories (100–999) with a device identifier suffix
  • Each subdirectory can hold a maximum of 9,999 files
  • File names must be 8 characters followed by a 3-character extension
  • The 4-digit sequential number must be consistent within a device

Apple's implementation on iPhone uses "APPLE" as the folder suffix (so you see folders like 100APPLE, 101APPLE) and "IMG_" as the file prefix. Other camera manufacturers use their own suffix and prefix — Canon uses "IMG_", Nikon uses "DSC_", Sony uses "DSC0" — but all follow the same underlying DCF structure.

What Is the DCIM Folder?

DCIM stands for Digital Camera Images. It is the mandatory top-level folder name in the DCF standard. Every camera — digital point-and-shoot, DSLR, mirrorless, iPhone, Android — stores all photos inside a DCIM folder. This is why when you connect any camera (or phone) to any computer, the computer can automatically recognize it as a camera and offer to import photos: the operating system knows to look for a DCIM folder.

When you connect your iPhone to a Mac with a USB cable and open Finder, you will see your iPhone listed in the sidebar. Click on your iPhone, then click "Files" to browse the file system. Your photos are inside the DCIM directory. On Windows, your iPhone appears as a camera device in File Explorer, and you can navigate to DCIM and its numbered subfolders directly.

Path Component Example Explanation
Root folder DCIM/ Required by DCF standard; all photos live here
Subfolder 100APPLE/ 3-digit number (100–999) + device code (APPLE)
File name IMG_4827 8-char name: 4-char prefix (IMG_) + 4-digit number
Extension .HEIC / .MOV Format identifier; not part of DCF numbering

File Extensions: HEIC, MOV, JPG, PNG

The file extension after the IMG_XXXX number tells you what format the file is in:

  • .HEIC — Standard iPhone photo in High Efficiency Image Container format (default since iOS 11)
  • .JPG / .JPEG — Photo saved in JPEG format (when "Most Compatible" is selected in Camera settings)
  • .PNG — Screenshots taken by pressing the side button and volume up
  • .MOV — Video clips recorded by the camera
  • .DNG — ProRAW photos (Digital Negative format, Adobe's open RAW standard that Apple adopted for ProRAW)
  • .AAE — Sidecar file containing edit history for a photo (the edits you make in Photos, stored separately from the original)

The .AAE sidecar files are why you sometimes see pairs of files when browsing your iPhone via USB — an IMG_XXXX.HEIC and an IMG_XXXX.AAE. The .AAE file is the edit record. If you copy only the HEIC without the AAE to your computer, the photo will appear unedited. Copy both files together to preserve your edits.

When and Why Numbers Repeat

The four-digit counter maxes out at 9999. After IMG_9999, iOS creates a new DCIM subfolder (e.g. 101APPLE) and starts numbering again from IMG_0001. This means you can have two files with the same name (IMG_0001.HEIC) in different subfolders — they are distinct files at different paths.

This can cause problems if you have been manually organizing imported photos on your Mac by filename without the folder path. Photos named IMG_0001 from two different iPhone folders could appear to be duplicates or could overwrite each other if naively copied to the same destination.

Best practice for transfers: When importing iPhone photos to your Mac or Windows PC, let the Photos app or a dedicated import tool handle the organization. Apple Photos imports and organizes by date, eliminating filename collision problems. If you import manually via Finder, keep the folder structure intact.

If you factory reset or restore your iPhone, the counter may reset. After a restore from backup, iOS typically resumes the counter where it left off (from the backup metadata), but a fresh setup (not from backup) starts from IMG_0001 again.

How to Rename iPhone Photos

iOS does not provide a built-in way to rename photo files while they are on your iPhone. The Photos app shows the original filename in the Info panel (swipe up on a photo to see Info) but does not allow editing it.

Options for renaming:

On Mac

  1. Export photos from Photos app: select photos → File → Export → Export Photo
  2. Choose a destination folder and click Export
  3. Rename the exported files in Finder using standard macOS renaming tools
  4. For bulk renaming, select multiple files in Finder, right-click → Rename to use the batch rename feature

On iPhone via Shortcuts

  1. Create a Shortcut using the "Get Photos" and "Rename File" actions
  2. Use "Save File" to save the renamed copy to the Files app
  3. Note: this creates a copy, not a rename of the original in Photos

For most practical purposes — organizing, searching, sharing — the original IMG_ filename matters less than the date and location metadata embedded in the EXIF data. The Photos app on iPhone and Mac organizes primarily by capture date, not filename. Learn more in our article on iPhone photo metadata and EXIF data.

If you have thousands of photos you want to sort through, the filename is rarely the right filter. Instead, use Swype Photo Cleaner to quickly swipe through your library and remove shots you no longer need.

Thousands of IMG_ Files? Start Deleting the Ones You Don't Need

Swype Photo Cleaner lets you quickly swipe through your entire camera roll — left to delete, right to keep. No confusing menus, no batch selections — just fast, satisfying cleanup.

Free · iPhone · iOS 16+ · 100% on-device, zero uploads

Download on theApp Store

Free · iPhone · iOS 16+

Frequently Asked Questions

Why does iPhone name photos IMG_XXXX?

iPhone uses the DCF (Design Rule for Camera File System) standard for naming photos — the same standard used by most digital cameras. Files are named IMG_ followed by a four-digit sequential number (IMG_0001 through IMG_9999). This standard was established by JEITA to ensure interoperability between cameras and computers. After reaching IMG_9999, the counter resets to IMG_0001 in a new folder.

What is the DCIM folder on iPhone?

DCIM stands for Digital Camera Images — the standard folder name required by the DCF file system specification. All digital cameras including iPhone store photos inside a DCIM folder. When you connect your iPhone to a Mac or Windows PC with a USB cable, the DCIM folder appears with numbered subfolders (100APPLE, 101APPLE, etc.) that each hold up to 9,999 photo files.

Do iPhone photo numbers ever repeat or reset?

Yes. The four-digit counter counts from 0001 to 9999. When it reaches 9999, iOS creates a new subfolder (e.g. 101APPLE) and starts the counter again from 0001. Two photos can have the same filename but will be in different subfolders. After a factory reset without restoring from backup, the counter may also reset to 0001.

Can I rename photos on iPhone?

iOS does not let you rename individual photo files directly in the Photos app. To rename photos, you need to export them first to a Mac and use Finder's rename feature, or use the iOS Shortcuts app to create a rename workflow that saves a renamed copy to the Files app. The Mac Photos app also supports batch export with custom naming.