Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to remove the preview icon of a gif or jpeg file ?

I made very little image file for the web, but they weight 45 Ko ! I guess this comes from the preview icons

Edit : I've added a screenshot to show you the informations i've got. seems to be the most accurate...

alt text

As you can see, i used 3 ways to get the size information :

  • from the finder, in the folder himself (45 ko)
  • from the Get Info dialog box (45 ko)
  • from the, General Info Box (0,5 Ko)
share|improve this question
Can you be more precise? Firstly, how is it related to Apple? Can you host one of those images so we can try to figure out where your problem might come from? – Loïc Wolff Nov 25 '10 at 22:19

As mankoff said, the large size is probably a resource fork (with things like previews). To confirm this, use the Terminal command ls -l@ /Volumes/Database/WebFolder/imgs/confirm.gif -- you'll probably see something like this:

$ ls -l@ /Volumes/Database/WebFolder/imgs/confirm.gif
-rw-r--r--@ 1 www  www  539 Nov 18 09:39 /Volumes/Database/WebFolder/imgs/confirm.gif     32  40748 

If it doesn't show a 40kb resource fork, report back so we'll all have a better idea what's going on.

As long as the image is just for web use, a big resource fork isn't really an issue, since the web server will only serve the data fork (which is just 539 bytes long). If want to compact the file anyway, use the command xattr -d /Volumes/Database/WebFolder/imgs/confirm.gif to remove the fork.

share|improve this answer

The Finder preview data isn't stored inside the actual file, so that's not what's causing your size problems.

ImageOptim is a handy GUI tool for shrinking excess data. Also, if you're making a small image I'd recommend png or gif, jpeg is designed for photos.

share|improve this answer
It's a gif file. Indeed. – Rabskatran Nov 26 '10 at 8:18
So what do you get when the image is run through a tool like ImageOptim? Is it still large? – Tim Nov 30 '10 at 1:16

Try deleting the resource fork. From the command line this could be:

cp /dev/null file.ext/rsrc

If you want to explore the resource fork more, use the DeRez CLI tool (from Developer Tools) or (GUI)

share|improve this answer

Your Answer


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.