Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

When you first create your OS X login account it takes a picture of you. Where does that picture get stored? I can't find it in ~/Pictures or ~/Library.

share|improve this question
    
Are you looking to replace the photo or you just want to know where it is to use it? –  Philip Regan Nov 3 '10 at 15:00
    
My wife likes the photo it took of here. She wants a copy to use elsewhere. –  Ian C. Nov 3 '10 at 15:06
    
possible duplicate of Where does the Mac store account pictures? –  Mark May 15 '12 at 17:07
add comment

4 Answers

up vote 7 down vote accepted

The photo can be found in the /Library/Caches folder, if you haven't cleared this folder yet. Otherwise, I recommend typing:

dscl . -read /Users/short_username JPEGPhoto | tail -1 | xxd -r -p > 
/PATH/TO/accountImage.jpg

on one line in a Terminal window, from Chealion's brilliant answer here. In the above example, a JPEG copy will be saved to /PATH/TO/accountImage.jpg.

share|improve this answer
    
With the caveat being that the user hasn't cleaned that out (like I do every month), even though my account image remains the same. –  Philip Regan Nov 3 '10 at 19:13
    
Is this answer valid anymore on Lion? The command is nice, but fails on most of my 10.7.3 and 10.7.4 machines to yield a workable jpg for accounts with custom pictures. –  bmike May 15 '12 at 16:26
add comment

Unless your account is a network account from a server such as OSX Server using directory services (or AD on Windows or LDAP on *nix), then it gets stored in the plist file that stores the local directory services data on your Mac.

Before Lion, these files were simply text formatted xml files stored as shortname.plist in the directory /private/var/db/dslocal/nodes/users

The image is encoded as a JPEG file under the key:

    <key>jpegphoto</key>
    <array>
            <data>
            /9j/4AAQSkZJRgABAQAAAQABAAD/4QBARXhpZgAATU0AKgAAAAgAAYdpAAQA
            AAABAAAAGgAAAAAAAqACAAQAAAABAAACAKADAAQAAAABAAACAAAAAAD/2wBD

If you selected a stock picture instead of a custom one, you may be able to locate that file with the following command:

    dscl . -read /Users/shortname Picture

The system also caches more than a handful of previous pictures so you can usually go back to a favorite picture using the system preference graphical tools. If your plist is stored in binary format, you may use a command like this to dump a xml version of the binary file to /tmp:

    plutil -convert xml1 shortname.plist -o /tmp/shortname.plist
share|improve this answer
add comment

take a look in ~/Library/Images/iChat Recent Pictures

share|improve this answer
    
There is no ~/Library/Images/iChat Recent Pictures directory. I did find ~/Library/Application\ Support/AddressBook/Images/ but the one file in there isn't an image file. –  Ian C. Nov 3 '10 at 15:38
    
I looked there, too, and didn't find anything. This is an odd one, to be sure. It might an invisible file to hide it from nefarious characters such as ourselves since the system uses it in a variety of places. –  Philip Regan Nov 3 '10 at 16:03
    
darn...it appeared to be in there for my current profile picture. You could try fs_usage while accessing it and see if that reveals the location –  Kevin Nov 3 '10 at 16:14
add comment

open finder, click: command,shift,G

type:

~/Library/caches/com.skype.skype

then click the folder that is titled as your user name.

then click the SKAvatar Cache folder.

it should be the first image.

Good luck!

share|improve this answer
2  
This doesn't answer the OP's question. –  Scot May 22 '13 at 4:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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