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
Question marked as Top-ranking reply

Posted on Jul 5, 2025 9:24 AM

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.

Similar questions

24 replies
Question marked as Top-ranking reply

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 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 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 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 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 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 8, 2025 6:59 AM in response to Ltlmrs

Ltlmrs wrote: … Is there a difference in the way that TIFF, HEIC, JPEG/JPG, and PNG work?
Would some be better than others in helping resolve this issue?

Picture Formats: One way to make a picture file is to record every pixel and, at it simplest, each pixel takes 3 bytes. So a 50 megapixel image would take 150 MB! But there's no need for that. If, for instance, the sky has 20 blue pixels in a row, then you only need to record "20xblue," and you save lots of space to get the same picture. That's called compression, and my example was lossless-- it had all the information in a smaller space. There are way more efficient compression schemes, and there are some that can get even more compression and smaller files by taking advantage of the way we see pictures-- recording only enough information to reproduce a picture that looks to us to be the same. That's lossy compression, and with that a 50 megapixel image may take up less than 1 MB! The final size of the file depends on how complex the pictures is and how much compression is used. The Photos app, for instance, asks what "quality" you want when you export a jpg-- that's how lossy it can be to save space.


Each compression scheme requires a different de-compression routine, and the picture file has to tell the image viewing app which scheme to use. So the picture file contains more than the picture-- it has to have some information about how the picture was compressed. JPG is the most popular scheme, and it can be lossless or have different amounts of "quality." HEIC is a newer format that is a more efficient compression scheme, but isn't yet as popular as jpg.


So if Preview can show a file as a recognizable picture, it had to be able to figure out what compression scheme was used, and it is clever enough not to be fooled by a wrong extension. I can't begin to understand how Preview can show you the picture, but you can't export it as HEIC, for instance.


You should try it again.

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.