2

Someone emailed me an image. I see it in Gmail, and I can see it in a browser, but when I try to open it up on Photoshop, I get an error saying:

Could not open "XYZ.jpg" because an unknown or invalid JPEG marker is found.

Does anyone know what is the issue or if there is a workaround?

7
  • Perhaps it is not actually a JPEG file? In Firefox, you can right-click an image and view its properties to confirm the file type. Sep 11, 2011 at 14:52
  • Take a screenshot of your browser (press PrintScreen or use an 3rd party program), and then paste it into a blank image in Photoshop. If the image is large, it might take some stitching.
    – dbkk101
    Sep 11, 2011 at 14:55
  • @Paul Lammertsma - it seems that all other image tools (paint.net, etc all seems to open it fine as a jpeg)
    – leora
    Sep 11, 2011 at 14:55
  • Perhaps those other applications discovered that the file is not in fact a JPEG, but a PNG, for instance. Sep 11, 2011 at 15:01
  • @ooo Which version of PhotoShop are you using?
    – Alpine
    Sep 11, 2011 at 15:02

14 Answers 14

4

Use Irfanview to open the image, if it is not actually a JPEG, Irfanview will tell you and ask if you want to change the extension to the correct one.

You could also save it as a BMP from Irfanview, it should open in any application then.

7

Admittedly this is a little abstruse, but open the file in a hex editor. In a hex editor, all examples of a given graphic file type will invariably begin with the same characters. If your file doesn't begin with

ff d8 ff e0 00 10 4a 46 49 46  |  ÿØÿà..JFIF

it isn't a .jpeg. Change the extension accordingly. If it actually is a .jpeg, then there is some other issue.

Here's a list of common file types:

.tif, .tiff

49 49 2a  |  II*

.jpg, .jpeg

ff d8 ff e0 00 10 4a 46 49 46  |  ÿØÿà..JFIF

.png

89 50 4e 47  |  .PNG

.bmp

42 4d 38  |  BM8

.gif

47 49 46 38 39 61  |  GIF89a

.psd

38 42 50 53  |  8BPS

.pdf

25 50 44 46 2d 31 2e 36 0d 25 e2 e3 cf d3  |  %PDF-1.6.%âãÏÓ
1
  • This is great. I found out quickly that a photo that was working online as a "jpeg" was actually a png file. Now Photoshop is happy! Mar 3, 2018 at 17:16
1

The simple solution would be to copy the image from your browser and paste it into a new document in Photoshop.

1

Try drag and dropping the image in a web browser.
After the browser opens the image, right click and save the image.
Then try opening it in Photoshop.


Another method:
You said that you can open it in paint.NET, you can open the image in paint.NET and do save as... and save it as a new file.
Then try opening that new file in Photoshop.

3
  • that is what i tried in the first place. no such luck
    – leora
    Sep 11, 2011 at 15:36
  • @ooo You said that you can open it in paint.NET, you can open the image in paint.NET and do save as... and save it as a new file. Then try opening that new file in Photoshop.
    – Alpine
    Sep 11, 2011 at 15:41
  • @leora I have created an open source tool for Windows and MacOS, to fix broken jpeg files. You can check and download it here: github.com/cdefgah/whatsapp-jpeg-repair
    – user1263607
    Jan 18, 2021 at 22:25
1

I had this kind of problem recently, and it's quite frustrating that PS couldn't open the file while the other "simple" program like Windows picture viewer could. Here are some workaround I did and it worked well without using any 3rd party app:

  • Open it in Paint program, and then save it in other format like PNG or BMP. And then you can open it normally in PS.
  • or, Sometimes Windows 10 Photo could also work. Open it in Photo (win10), and then "Save a copy". Many times it worked, but sometimes it didn't.
  • or, Open the image in browser, and then right-click it, copy image. Open the photoshop and make a new document (usually PS will automatically set the size of the new document based on the copied image), and then paste it there.

in my experience, those methods always work. Good luck.

1
  • 1
    I have created an open source tool for Windows and MacOS, to fix broken jpeg files. You can check and download it here: github.com/cdefgah/whatsapp-jpeg-repair
    – user1263607
    Jan 18, 2021 at 22:23
1

If you use Windows, there is no need for third party software.

Right click the image, click edit to open it with MS Paint. While the mouse cursor is on the actual image, press Ctrl+S to save it. Then close MS Paint. You can now open it with Photoshop.

This is the fastest way as far as I know.

Also, it is not only Gmail but Yandex.Mail and WhatsApp Web too. I assume they don't check the actual format, always saving the image with a jpg extension.

1

I have the same problem sometimes with my Adobe Suite when I download WhatsApp images. I have a macOS Mojave, just in case this doesn't work in other OS.

If you want to import the image directly to Adobe Illustrator:

  1. Download and save the image from WhatsApp.
  2. Change the file extension from ".jpeg" to ".heic" (Not ready to import to AI yet)
  3. Open the new ".heic" file in Adobe Photoshop
  4. Save as a ".jpeg" and set the quality needed
  5. Now you can use the picture in any of the Adobe Suite software.

It's super annoying to do this but until WhatsApp solve the issue that's my way-out.

1
  • I have created an open source tool for Windows and MacOS, to fix broken jpeg files. You can check and download it here: github.com/cdefgah/whatsapp-jpeg-repair
    – user1263607
    Jan 18, 2021 at 22:24
0

Here is a way I found around this problem.

This is for Windows I assume you can find an equivalent with MAC using this method.

Right Click the JPG Choose Open With > Windows Picture and Fax Viewer Then Copy to (Or Save As) and rename the jpg file and save

Open with Photoshop

3
  • this will reencode the file, which will lower it's quality
    – bortao
    Sep 21, 2011 at 4:16
  • Depending on your use of the file this may not be an issue, I use it on a case by case basis when I run into this issue.
    – L84
    Sep 21, 2011 at 5:29
  • I have created an open source tool for Windows and MacOS, to fix broken jpeg files. You can check and download it here: github.com/cdefgah/whatsapp-jpeg-repair
    – user1263607
    Jan 18, 2021 at 22:24
0

Here's another workaround if you aren't able to determine the image's correct format.

Generally speaking, if you can open it in a browser, you should be able to right-click and "Save Image As". Your browser should automatically detect the image's file format. Saving and editing should then be straightforward.

1
  • Have you seen the previous answer? How does your answer differs from the one above? Oct 30, 2016 at 6:48
0

You could try to find out the mime type. A normal webbrowser should show you that in the image properties... Then you can find out which real filetype you've got!

0

In some situation the image which is downloaded from some of the phone can't copy the camera data on the image. That's why sometime the image won't open or shows some error.

  1. Open the file in photoshop and save it as Tiff format and open it again and save as jpeg. it works.

  2. The image which don't open et al in photoshop better preview and take it screen shot and it opens in photoshop.

0

this works everytime.

Open the image in windows photoviewer. Now zoom in > then rotate the image once using the icons in the bottom. Now click on next button to view another image. Close the windows photo viewer. Now reopen the photo and rotate back the image to original orientation. Now you can import the image to photoshop.

0

JUST USE PAINT!

The fastest way I found to solve this is (if you are on a PC) to drag-and-drop the file onto Paint, save, repeat.

-1

Change the file extension to .psd instead of .jpg. Open in Photoshop and Save again.

1
  • 2
    Can you provide a reference to back up this answer?
    – DavidPostill
    May 9, 2017 at 10:28

Not the answer you're looking for? Browse other questions tagged or ask your own question.