Why random photo files names?

A couple of years ago, someone asked the question about Random file names being generated by iPhone camera. Instead of using the standard IMG_XXXX filename format, it would generate UYNZXXXX or PKEYXXXX for eg. This question was never answered, but I just discovered the cause. It occurs whenever a photo is taken using the WhatsApp camera app. Hope this helps anyone wondering the same thing.

iPhone SE (3rd generation)

Posted on Aug 1, 2023 4:36 PM

Reply
Question marked as Top-ranking reply

Posted on Jan 21, 2024 2:52 AM

MTP (Media Transfer Protocol) is junk and unreliable. Don't use MTP unless you just want to pull 1 file. For backups, use a real tool and get the original files.


When doing an MTP transfer, there is a conversion layer (com.apple.photos.ImageConversionService, com.apple.photos.VideoConversionService) on iOS that is converting the original HEIC files into JPGs. MTP does not even give the original file. It actually creates the file on-the-fly for MTP, so for a converted JPG, it's a newly created file with an incorrect "date created" metadata.


Forget about backing up with MTP. You are not backing up the original file in the first place, let alone the correct metadata, so the file hashes won't match. However, MP4s are original (file hashes match), but the filenames are random (does not match on file system). The same random filenames apply to 3rd-party files added to the DCIM.


Here's how to get the original files:


If you are jailbroken, you can SSH and do an SFTP file transfer from `/var/mobile/Media/DCIM` over the network. Simple for grabbing a file without plugging in a cable.


With or without jailbreak but with a USB cable, you can use some 3rd-party tools like iMazing (paid) or 3uTools (free) on Windows or ifuse on macOS and Linux.


In 3uTools, go to "iDevice" tab > "Files" in sidebar > "File System (User)" in category tree > "DCIM" in directory list > Right click > Export.


With command-line tool ifuse, the command looks like:


ifuse /mnt/iphone cp -a /mnt/iphone/DCIM/*


It's best to avoid MTP. Use a tool to access the file system.

7 replies
Question marked as Top-ranking reply

Jan 21, 2024 2:52 AM in response to Tiger_858

MTP (Media Transfer Protocol) is junk and unreliable. Don't use MTP unless you just want to pull 1 file. For backups, use a real tool and get the original files.


When doing an MTP transfer, there is a conversion layer (com.apple.photos.ImageConversionService, com.apple.photos.VideoConversionService) on iOS that is converting the original HEIC files into JPGs. MTP does not even give the original file. It actually creates the file on-the-fly for MTP, so for a converted JPG, it's a newly created file with an incorrect "date created" metadata.


Forget about backing up with MTP. You are not backing up the original file in the first place, let alone the correct metadata, so the file hashes won't match. However, MP4s are original (file hashes match), but the filenames are random (does not match on file system). The same random filenames apply to 3rd-party files added to the DCIM.


Here's how to get the original files:


If you are jailbroken, you can SSH and do an SFTP file transfer from `/var/mobile/Media/DCIM` over the network. Simple for grabbing a file without plugging in a cable.


With or without jailbreak but with a USB cable, you can use some 3rd-party tools like iMazing (paid) or 3uTools (free) on Windows or ifuse on macOS and Linux.


In 3uTools, go to "iDevice" tab > "Files" in sidebar > "File System (User)" in category tree > "DCIM" in directory list > Right click > Export.


With command-line tool ifuse, the command looks like:


ifuse /mnt/iphone cp -a /mnt/iphone/DCIM/*


It's best to avoid MTP. Use a tool to access the file system.

Aug 2, 2023 12:59 AM in response to Tiger_858

Thank you for posting this solution.

Photos itself is also creating random filenames, to have unique identifiers, names like "26FF93A5-0336-4AEA-BED9-1B004DDABD7D.heic".

But we will only be seeing these internal filenames, if the Photos LIbrary gets damaged and Photos is recovering orphaned items from the library, when it is repairing the damaged library. Otherwise Photos will not show its own internal filenames but the original filenames created by the camera.


Aug 12, 2023 2:26 PM in response to Tiger_858

I am surprised that there isn't more replies to this question. I have this same exact issue with my iPhone 13 and it is very annoying. My phone saves a combination of about 4 different file types, random file names, and duplicate photos. When browsing the contents of your phone using a computer, you see blank .AAE files, .JPG files (photos), .MOV files (live photos), .MP4 files(videos).


Some pictures will be under random files names like BWFS6446, FUJY7502, HJWC2628, XTGC3785, etc...

I've also noticed that when people send you live photos, they are saved twice in your phone. Once as a .JPEG and again as a .MOV


Regular photos will also show up duplicated under something like IMG_0001 and IMG_E0001


And when importing photos from your phone using the windows picture transfer wizard, duplicate photos are showing up.


What ever happened to the iPhone simply saving photos as IMG_001, IMG_002, IMG_003 etc...?

Aug 12, 2023 10:12 PM in response to Yer_Man

I do not use WhatsApp. I only take photos using the stock camera app. Most of these random file names are from when I take photos using the stock camera app or from when people send me photos from their iPhone using the stock camera app. This is for sure not a 3rd party app issue.


And the duplicate photos come from when a live photo is sent to me. The photo is saved as a still .JPEG photo and a 2 second .MOV file.


I then have a bunch of photos that start with IMG_Exxxx. X=photo number of original photo. I researched that issue and read that the IMG_Exxx is created when you edit a photo on your phone to retain the original photo, but I do not edit any photos on my phone.

Aug 13, 2023 12:16 AM in response to uBreakIt_iRepairIt

The two files for a Live Photo are not duplicates. A Live Photo is represented by several files, a high resolution still frame (JPEG or HEIC taken at the moment, when you press the shutter release, and a short video clip, showing the motion (a MOV file). There may be an additional AAE file, if you added a Live effect. This file is describing the effect. You need to keep all three files and import them together, if you want to transfer a Live Photo to a Mac.


The files with names like IMG_Exxxx will be created by the camera, when your Camera is adding an effect to the photo, when you take a photo, for example, when the camera is set to crop the photos to a different format, when taking them. Then both the original 4:3 version and the cropped Square or 16:6 version will be saved as separate files, so we can remove the custom cropping and revert to the 4:3 version.


May 21, 2024 3:35 AM in response to XP1_

What about just downloading the images from icloud? Do my icloud photos have the exact same exif data & numbering/labeling system as inside my iphone? Is there even any way to see the iphone photo numbers while I use the apple "photos" app inside the stock iphone?

...weird there is not more people talking about this insane issue....

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Why random photo files names?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.