I have jpg photos with frames put on them which a friend made for me. I noticed when I open the jpgs though, that the image loads first and then the frame loads on top of it (that is, I can see the parts of the image which are hidden underneath the frame before they actually get hidden).

This is confusing to me though, since I thought jpgs don't have layers and are flattened. Does anybody know what I'm talking about? Do jpgs actually have layers?

  • 5
    \$\begingroup\$ (ha, your question made me look like your avatar) … Does the hidden "layer" look like the JPG's thumbnail? Could the software you're using first show the thumbnail while it is loading the real image? \$\endgroup\$ Mar 9, 2011 at 15:20

4 Answers 4


At least in my computers (Windows, various versions) editing a .jpg file in Photoshop and saving it creates a situation where, if there is some type of embedded thumbnail, Photoshop does not update it, later on while viewing the file in another program (Windows Image Viewer for example) the thumbnail is loaded first and shown (upscaled to fit) while the program processes the compressed jpeg data to create the full resolution image.

Most of the time, these programs are not fast enough so that the eye almost always catches the enlarged thumbnail before the actual image. In my case, I get to see the (yet) uncorrected colors, the uncropped framing, etc. (I.e. the image lacking whatever changes I made in Ps).

This is no anoyance (for me) at all, but I have seen that using "Save As" with a different name, instead of the regular "Save" avoids this situation.

What leads me to think that there is a thumbnail embedded in the metadata segment of the file is that if I transfer the edited file to a computer where no previous version of the image exists, the "original ghost" can be seen when opening the picture.

Another option that avoids the issue is saving a file with the "Save for Web" command. This uses a routine that somehow compresses the jpeg a little bit more while apparently not reducing the quality so much. Part of the algorithm includes striping most non-image data before creating the new file.

When I do this, I notice the Windows Picture Viewer takes a little extra time before showing anything at all, specially if the file was not created using "progessive" in the "Save For Web" dialog.

P.S. Windows usually creates a thumbnail database for folder that contains only pictures or mostly pictures. Editing a picture, or overwriting the file almost always makes Windows (At least XP & Vista) show the incorrect thumbnail when browsing the directory in Windows Explorer. I'm aware this is a totally different problem and seems to be unrelated to the issue described by the O.p. When this bothers me enough, I delete the hidden "thumbs.db" file in the offending folder then switch the view mode to anything but Large Thumbnails and then back to that. This forces the creation of a new thumbs.db file that should use the actual data from the files in the folder.

  • \$\begingroup\$ The JPEG/EXIF standard does indeed call for a thumbnail, but it is ridiculously small — usually 160x120. So, programs usually ignore that and create their own database of thumbnails, like the thumbs.db you noticed. \$\endgroup\$
    – mattdm
    Jun 29, 2015 at 4:23
  • \$\begingroup\$ There is a story of a blogger long ago who cropped a picture of her eye to post on her site. Problem was that the thumbnail was still intact, and the original picture was a nude. \$\endgroup\$ Dec 30, 2017 at 17:06

Not really. Weirdly, "jpeg" is really the name of the compression and not the standard for the file format that bears the .jpg name. There's various different container formats that can hold jpeg-compressed streams. The official one is JFIF, although by strict reading files containing EXIF data don't properly correspond to that spec. (Aren't standards awesome?) This format specifies a single frame of data. There's a new format called JPEG Multi-Picture Format which can hold multiple frames, but those can't be read by normal JPEG viewers (and are apparently normally labeled .mpo).

However, regular JFIF/JPEG-EXIF files can use either a "standard" layout or a "progressive" one. In the progressive format, a lower-resolution stream is rendered first, and further data is filled in from later bitstreams in the file. It may be possible to abuse this such that the "overlay frame" is only in the final stream. But display of this would be strongly dependent on your viewer. On a fast system with the file cached, it'd basically all load at once.

  • \$\begingroup\$ +1 for the idea of abusing the interleaved format (I believe progressive should display the whole image in a linear manner, am I correct?). However, the caching is not the only thing that may affect the apparent result. If the viewer is "stupid" enough, then subsampling the image (for reducing its size for display) can actually eliminate the frame altogether (aliasing). \$\endgroup\$
    – ysap
    Mar 9, 2011 at 18:51
  • \$\begingroup\$ One possibility is that rather than being some sort of wizardry exploiting the progressive format, fine detail on the "overlay" frame simply isn't as visible on the early progressive passes, giving the illusion that you're not seeing it. \$\endgroup\$ Jun 30, 2015 at 4:07
  • \$\begingroup\$ Isn't it a lot more likely the OP is just seeing the unedited thumbnail preview embedded in the metadata while the full edited image is loading? \$\endgroup\$
    – Michael C
    Jun 3, 2016 at 13:14
  • \$\begingroup\$ @MichaelClark I doubt it; as noted in an earlier comment to another answer, those thumbnails are usually so low-resolution as to be useless. \$\endgroup\$
    – mattdm
    Jun 3, 2016 at 14:03
  • \$\begingroup\$ Some jpegs have two sizes of preview images, a small thumb and a larger preview. It depends on the camera. \$\endgroup\$
    – Michael C
    Jun 3, 2016 at 16:12

JPEGs do not, to the best of my knowledge, have layers. They do have progressive encoding whereby a series of lower resolution versions are displayed as the data is arriving until all the data is there and the final full quality version is displayed.

My best guess is that what you're seeing is an artifact from this process, though if you could post the image I could do better than guessing!


Try deleting the extension in the filename and see if it still opens. Sounds to me like file is behaving like a PDF. If you are hiding extensions on your OS, it could be that the file is actually "FileName.jpg.pdf" or other scenario similar to this whereas the naming convention does not actually represent the file type.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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