How did my photos turn into .exe files on a Mac, and how can I fix this?

I have/had over 50K photos and due to various reasons, over the years, I thought I had lost a lot of them. However, yesterday, while running a clean-up program (I never let the computer delete anything without checking it out first), I found hundreds of missing photos. Problem - they are all listed as Unix Executable Files. Now my research tells me that EXE files are windows-based. I have only ever used Mac for my photos.


Question 1: How did all these photos turn to the dark side and become EXE?

Question 2: How do I get them back / open them / save to photos?


As always, thank ya'll for your assistance.




[Re-Titled by Moderator]

Original Title: Photos converted to EXE files

Mac mini, macOS 15.5

Posted on Jul 5, 2025 1:41 AM

Reply
24 replies

Jul 8, 2025 7:25 AM in response to Richard.Taylor

Richard.Taylor wrote:

I can't begin to understand how Preview can show you the picture, but you can't export it as HEIC, for instance.

I guess this does not apply here, but beware that Preview.app has an old bug where it in batch mode exports some images with a wrong codec but uses a different extension.


So, for example a .jpeg might really be .heic (HEIF) if you inspect them with Preview > Tools > Show Inspector > General Info (I tried to ask the OP to check this detail in my previous post...).


Exporting from Preview, JPG vs JPEG creat… - Apple Community


That bug is still present in Sequoia 15.5:


Jul 5, 2025 4:27 AM in response to Ltlmrs

Ltlmrs wrote:

I was running "Clean My Mac."
Some of the files do have jpg extensions (should that be jpeg?). Some only have the names I gave them in Photos (ie, Dog in pond). If I just added the extension, would that work?


Clean My Mac is infamous for corrupting the system and damaging files. Did you let it "clean" and corrupt the Photos library? For example, check the last comment in this thread:


How to prompt Photos in MacOS Sequoia to … - Apple Community


Sometimes the user has to backup, erase and install, and restore to try to fix the damage the "cleaners" have done.


You might try to fix the extensions outside Photos by exporting them first via File > Export (either as originals or as edited versions depending if you want to preserve the edits done inside Photos). .jpg is the same as .jpeg.

Jul 5, 2025 7:37 AM in response to Ltlmrs

Ltlmrs wrote: … I found hundreds of missing photos. Problem - they are all listed as Unix Executable Files.

How large are these files? Pictures should be 300 KB or more, mostly. If these exe files are a few kilobytes, then they may not be pictures at all, but just worthless information about a picture. Or they may be just tiny icon sized images meant for use inside some old app. Make sure you don't waste your time trying to make sense out of files that aren't worth it. (I speak from experience…)

Jul 7, 2025 10:45 PM in response to Kurt Lang

Kurt Lang wrote:

I presume you mean they have this desktop icon:

https://discussions.apple.com/content/attachment/d6fa5918-1e3c-4306-a24c-a80ba9d35f24

If so, then no, you're pictures have not been converted to anything. They're still the same as they were before.

As mentioned by others, you did yourself no favors having CreamMyMac on your computer. What may have happened is these photos never had a file extension (anything from OS 9 and earlier) and CMM stripped the resource fork, or just plain hosed it. Without a file extension or Type & Creator codes, the OS has nothing to go by to figure out what the file is. So it gets a generic exec icon. Which is the same thing Windows does when it assigns a file an icon of a dog-eared piece of paper with the Windows logo in the middle. Both mean the same thing - "I don't know what this is."


macOS uses an icon of a dog-eared piece of paper, too.


In Unix, on which macOS is based,

  • A command line program is a file with the 'execute' bit set that has the proper "magic header" bytes to tell the OS that it contains machine code.
  • A shell script is a text file that has the 'execute' bit set. The beginning of the script may optionally have a line indicating which program to use to interpret the rest of the script.
  • A data file is one that does not have the 'execute' bit set.


So the Finder does not know what type of data is in a file, whether you see the dog-eared paper icon or the Exec icon will depend how the file permissions are set – specifically, the 'execute' bit.

Jul 5, 2025 9:24 AM in response to Ltlmrs

I presume you mean they have this desktop icon:



If so, then no, you're pictures have not been converted to anything. They're still the same as they were before.


As mentioned by others, you did yourself no favors having CreamMyMac on your computer. What may have happened is these photos never had a file extension (anything from OS 9 and earlier) and CMM stripped the resource fork, or just plain hosed it. Without a file extension or Type & Creator codes, the OS has nothing to go by to figure out what the file is. So it gets a generic exec icon. Which is the same thing Windows does when it assigns a file an icon of a dog-eared piece of paper with the Windows logo in the middle. Both mean the same thing - "I don't know what this is."


Yer_Man has noted the solution:


Simply adding 'jpg to each will probably fix the problem, assuming they were jpgs to begin with.


You'll have to experiment. Try adding .jpg to a file and then opening it. If it's not a JPEG, the image editing app will give you an error message. If it does, try a different extension, such as .tif . You'll know what file format you normally used, so try the most likely one first.

Jul 6, 2025 2:42 AM in response to Yer_Man

I appreciate all the good suggestions. But, here's another conundrum.

Putting aside the exe files (or maybe not, I don't know), many of my photos can't be imported into Photos, for "unknown reasons."

You will see they all have jpeg/jpg extensions AND I am able to open the photos in Preview or my Movavi Photo Editor. I have tried renaming them in Movavi with the appropriate extension, but I still get the same error.


Here is the Info on one of the photos, if it is of any help.

(The photo was taken in Texas in the 60's. I am the teen on the right, next to my mom, with her three brothers, one sister, assorted in-laws, and my younger brother front left. Dad, of course, is taking the picture.)

Jul 6, 2025 3:49 AM in response to Ltlmrs

Ltlmrs wrote:

Putting aside the exe files (or maybe not, I don't know), many of my photos can't be imported into Photos, for "unknown reasons."
You will see they all have jpeg/jpg extensions AND I ** able to open the photos in Preview or my Movavi Photo Editor. I have tried renaming them in Movavi with the appropriate extension, but I still get the same error.

Did you manually add .jpeg suffix and are you sure it is not using another codec that is incompatible with Photos.app?


What does Preview.app Command-I report as the Document type which might not correspond to the extension like in the example below?


Jul 5, 2025 3:50 AM in response to Ltlmrs

Maybe the "cleaner" program just brough up some system files that lack an extension like .jpg or somehow made them lose their extension. Often such files are labeled as exe or something like that.


What "cleaner" app did you use? Those "cleaners" are frowned here because they often just corrupt the system, so I'd advise not using them and uninstalling them.


Anyway, an app like GraphicConverter can sniff and correct the extension of many common image files via its Browser > Filesystem Attributes > Filename Extension > Verify and correct.

Jul 5, 2025 9:06 AM in response to Ltlmrs

The reason they became exe files is(most likely) they have been stored on a disk formatted with one of the FAT formats and they have lost their file suffix. The OS then has a guest what they might be and gets it wrong.


. Simply adding 'jpg to each will probably fix the problem, assuming they were jpgs to begin with.


So in the case of, say, DSC_1234.exe, simply replace the .exe with .jpg and DSC_1234.jpg should open and behave like a photograph.


Oh and Never install any app that claims to “clean up”, “tune up” or “speed up” your Mac. These apps exist for one reason: to extract money from the wallets of the inexperienced user. What they do can be done in other ways, and mostly what they do is unnecessary, but sounds good. Unfortunately in the hands of an inexperienced user they can do a lot of damage to a Mac OS installation. Avoid.



Jul 7, 2025 12:22 AM in response to Yer_Man

Ok, let's move on from don't use cleaners. It's gone. What I need are solutions to putting these pictures back into Photos.


So, what I have is the same problem presenting in different ways. When attempting to import into Photos, they all fail. "Cannot import - Unknown Error"


1) IMG_0434.jpeg EXE file

2) Dog on Beach EXE file

3) 0005D9FF-11D7-4028-92F4-B464E586D75A.jpeg EXE file

4) IMG_2568.jpeg JPEG Image


Note: All files with extensions already had the extensions. I did not add them.

Note: Some files in any of the above categories have photo thumbprints and some have blank or EXE thumbprints.

Note: Adding .jpeg to a file will change a blank thumbprint to a photo thumbprint.

Note: All files with extensions can be opened in Preview. However, they cannot be imported/saved to Photos.


I just really need to get these into Photos. They encompass 45 years of married life with daughter, growing up years, and ancestral pictures.


As always, I appreciate all your suggestions; however please note that I am not a developer, so plain English works best for my understanding.


Jul 7, 2025 1:11 PM in response to Richard.Taylor

I think my nod to Yer_Man was erased from my last post (my error).


Yes, I have tried opening in Preview, saving in Preview, then trying to import into photos. Doesn’t work.


I have added extensions to files that are missing them, then saving, but they won’t import.


I shall look into all the suggestions and maybe one will do the trick.


Thanks a bunch.

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.

How did my photos turn into .exe files on a Mac, and how can I fix this?

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