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 3:46 AM in response to Ltlmrs

Ltlmrs wrote:

Richard, I thought I answered this last night, but I can't find that post. Anyway:
Yes, I have file>exported = nothing.

I have only been adding jpeg to the photos that are missing extensions.
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?


Those are all different formats. If you have a photo encoded using one of those formats, and you try to interpret the data as if it were encoded in another format, the data will appear to be garbage.


TIFF is a container format that can contain images in various formats, but a TIFF file would still appear to be garbage to an application that blindly tried to interpret it as some other sort of file.


Changing a file's extension, alone, would not change its format, unless there was some sort of special-casing to treat a renaming request as a (renaming + file format conversion) request. So you don't want a JPEG file to have the .TIFF extension, or vice versa. Maybe an application would be clever enough to look at the first few bytes of your file and figure out the mismatch, but more likely, you'd simply get complaints that the file was corrupt.


If the file was actually good, but just had the wrong extension, fixing the extension might salvage the file.

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.

Jul 8, 2025 1:04 PM in response to Servant of Cats

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

Sorry, I didn't mean to suggest that was the only way the OS shows unknown file types. Excellent breakdown, too, of how the OS tries to determine what is what.


Apple also slowly deprecates things, as I'm sure you know. There used to be a basic icon for OS 9 and earlier suitcase TrueType fonts. But they now display with the exec icon. The Kind column still correctly indicates them as a TrueType font.


Type 1 Postscript fonts have gotten more changes. The icons are now just a blank, dog-eared piece of paper. The font data is still correctly identified as PostScript Type 1 LWFN Font in the Kind column, but the suitcase of bitmapped screen fonts, which used to be correctly indicated as a Suitcase Font (or something similar) is now listed as TrueType® font. Which is completely wrong.

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.