Every Mother

Fixing the “Unknown or Invalid JPEG Marker” Error in Photoshop on a Mac

F

If you’ve ever tried to open a JPEG on your Mac and Photoshop threw the error “unknown or invalid JPEG marker type,” you’re not alone. This is a common issue, especially with images taken on an iPhone. The good news is that the fix is quick, simple, and something you can do right in Finder or Preview.

Could not open because an unknown or invalid JPEG marker type is found.

Below is the video walkthrough, followed by the full video transcript and written steps.


Watch the Video

Hello, so today is a quick tip about how if you’re on a Mac, and you have a JPEG with an extension dot JPEG, and you try to open it in Photoshop and you get cannot open because “an unknown or invalid JPEG marker type is found.” Now, if you click when you’re in your finder and you hold down your spacebar, that pops up a preview, and you can see that the image is there but you can’t open it in Photoshop. Now when you’re in view as a list I can see that this image was taken with an iPhone 11 Pro and I’m in a new Photoshop. So the issue is likely that this file is really a .HEIC and it is mislabeled as a JPEG and so it’s getting a conflict. So one thing that you can do is if you suspect that that’s the issue, simply click into your file name and type in each HEIC, use and you can see it changes the preview, now I can double-click it, and it opens as an HEIC. Okay, so that’s definitely one way. Basically the marker, the metadata is screwed up and so you can fix it by just relabeling it the correct file type. Another thing that you can do is you can open with Preview. In Preview you can do File, Nope File >, Export, and you can choose an HEIC here as well. Now you can also do export. However, I think even if you choose JPEG here and we say try, let’s see what happens. Yep, that will work too. So you can also just open the corrupt file in preview and then save as a new JPEG image and you can get it right as a JPEG for you. Alright, so I hope those options work for you and fix the issue of JPEG’s not opening because of the wrong marker in Photoshop, so that JPEG marker type is unknown or invalid. Alright, good luck!


Why Photoshop Can’t Open Some JPEGs: HEIC

If you can preview the image in Finder but Photoshop refuses to open it, the file is probably mislabeled. iPhones often save photos as HEIC files. When a HEIC is renamed with a .jpeg extension, Photoshop reads the metadata, gets confused, and flags the file as invalid.

Fortunately, there are two straightforward fixes for changing files one-by-one (renaming and reexporting) and several solutions for automating the process to fix images in bulk.


Fix 1: Rename the File Extension

  1. Select the image in Finder.
  2. Press the spacebar to confirm that the preview displays correctly.
  3. Click the filename and change .jpeg to .heic.
  4. The preview will update, and you should now be able to open the file in Preview or Photoshop.

This works because the metadata is intact. The file was mislabeled.


Fix 2: Re-export the Image Using Preview

If renaming doesn’t solve it, open the file in the Preview app.

  1. Right-click the file and choose Open With > Preview.
  2. Go to File > Export.
  3. Save the file as either an HEIC or a fresh JPEG.

Preview correctly rewrites the metadata so that Photoshop opens the new file without errors.


That’s It

Both methods work because they fix the mismatch between the file type and the metadata. If Photoshop keeps complaining about an “unknown or invalid marker,” it usually means it’s not a real JPEG at all. A quick rename or re-export will bring it back to life.


What to Do for Hundreds or Thousands of Images with this Error (Automated Image Conversion Solutions on Mac)

Manually changing the file extensions or exporting them one by one through Preview is not practical for dozens, hundreds, or even thousands of images. In this scenario, you need to use an automated batch solution. Macs have many built-in tools that can handle bulk image conversions.

Option 1: Batch Rename Extensions using Finder (Change extensions to the true file type, HEIC)

You can rename multiple files’ extensions from .jpg or .jpeg to .heic in bulk and natively in Mac’s Finder.

  1. Open the folder containing the images.
  2. Press Cmd + A to select all files (or select them in large batches).
  3. Right-click and choose Rename…
  4. In the modal window’s drop-down menu, choose Replace Text.
  5. In the Find field, put: jpg (or jpeg)
  6. In the Replace field, put: heic
  7. Click Rename. A pop-up will appear asking if you want to change the extension from .jpeg to .heic. Check the “Apply to All” box, then click Use HEIC. MacOS will update the extensions of all selected files instantly, and you will now be able to open your files in Photoshop.
Use mac finder to rename many files' extensions at the same time.

Option 2: Use the Native macOS “Automator” App (To Convert the mislabeled HEICS to actual JPEGs)

If you actually want the image files to be true JPEG files for your workflow, you can create a quick Automator script to batch-convert them using the Mac’s native processing engine:

  1. Open Automator (found in Applications) and choose New > Workflow.
  2. In the actions sidebar, search for and drag Get Specified Finder Items (or Ask for Finder Items) to the right panel.
  3. Search for and drag Change Type of Images to the panel. (Automator will ask if you want to add a “Copy Finder Items” action to preserve originals—it is highly recommended to click Add so they don’t overwrite the original files). In this box, create a new folder or navigate to the folder where you want the newly created images to live.
  4. In the Change Type of Images action, set the drop-down to JPEG.
  5. Drag and drop the massive folder of images into the Get Specified Finder Items box and hit Run in the top right corner. macOS will process the conversion in the background.
Use the Automator application on Mac to bulk rename mislabeled image files from heic to jpg or jpeg

Option 3: Adobe Bridge (Batch Rename or Export in Adobe)

Since you are already using Photoshop, you likely have access to Adobe Bridge (included in the Creative Cloud subscription):

  • To Bulk Rename: Open your folder of images with errors in Adobe Bridge, select all files, go to Tools > Batch Rename, and change the string extension to .heic.
  • To Bulk Convert: Alternatively, you can use the Workflow panel in Bridge to set up a batch export that forces a re-conversion into standard JPEGs, which will rewrite the correct markers.

Frequently Asked Questions about HEIC and JPG/JPEG Errors

Photoshop is a professional-grade software that requires high data integrity. When you try to open a file, Photoshop does not just trust the file extension label (.jpg); it looks at the binary header/markers inside the file’s code.

  • Every true JPEG file starts with a specific chunk of code called a “marker” (specifically, it looks for the hex markers FF D8).
  • Sometimes HEIC files are simply given a jpg/jpeg extension but are actually an HEIC file. In this case, Photoshop reads the code, doesn’t find the expected JPEG marker, and immediately throws the “Unknown or Invalid JPEG marker” error to protect you from opening a corrupted file. If you open a true HEIC file in a hex editor, you won’t see FF D8. Instead, the first 4 bytes vary depending on the exact size of the container metadata, followed immediately by the ASCII characters ftypheic or ftypmif1.

Modern iPhones capture photos using a format called HEIC (High Efficiency Image Container). This format is technically a Superior format to JPEG because it compresses the file to a much smaller size while maintaining high quality, and it holds extra metadata (like depth data or transparency layers).

Sometimes, if you press the Spacebar or open a jpeg in Mac’s Preview app, the image shows up perfectly fine, but Photoshop errors. This is because macOS is incredibly smart and designed to be user-friendly. When Apple’s native Finder tries to open a file, it doesn’t just read the file extension or fail if there’s a marker mismatch. It scans the actual binary file container, realizes “Oh, this says it’s a JPEG but it’s actually an HEIC file made on an iPhone,” and silently decodes it correctly anyway; Photoshop does not.

If you download images from a cloud service (like Google Drive, OneDrive, or Dropbox) or back up images from an iPhone to a computer via a third-party app, the transfer software likely caused the issue.

  • Many backup tools are coded to automatically rename files .jpg so that the images are universally compatible with older computers and devices. However, in many cases, the software renames the label without actually converting the data inside. So, it may dump thousands of Apple HEIC photos onto the computer, forcing an .jpg extension onto them.
  • Another issue might be a direct Airdrop or a mismatch with the transfer cable. When transferring files directly from an iPhone to a Mac via AirDrop or a USB cable, Apple has a setting under Settings > Photos > Transfer to Mac or PC. If it is set to “Keep Originals,” the iPhone sends raw HEIC files. Sometimes, if a third-party file transfer program (like an old Android/Windows-to-Mac bridging app) intercepts that transfer, it might forcefully tag them as .jpg during the import process because it doesn’t fully understand the newer HEIC container.

About the author

Kelly Barkhurst

Designer to Fullstack is my place to geek out and share tech solutions from my day-to-day as a graphic designer, programmer, and business owner (portfolio). I also write on Arts and Bricks, a parenting blog and decal shop that embraces my family’s love of Art and LEGO bricks!

By Kelly Barkhurst December 2, 2025

Recent Posts

Archives

Categories