The Mac has the ability to take screenshots with just a keyboard shortcut or two. If you want a few more advanced capabilities, you can use the built-in Grab application (located at /Applications/Utilities) to take screenshots.
But neither of these screenshot options provides an easy way for you to specify your preferred graphics file format JPG, TIFF, GIF, PNG, or PDF for screenshots. Luckily, you can use Terminal, an application included with your Mac, to change the default graphics format.
The Mac captures screenshots using PNG as the default image format. This versatile format is popular, and provides for lossless compression, preserving the quality of the image while still creating compact files.
But while PNG is popular it may not be the best format for everyone, especially if you use your screenshots in documents outside of the web, where PNG is not as widely used. You can convert PNG using most graphics editors, including the built-in Preview app or the Photos app. But why take the time to convert a screenshot when you can just tell your Mac you want to save screenshots in a different format?
The Mac can take screenshots in PNG, JPG, TIFF, GIF, and PDF formats. What's missing is a simple way to set which format to use. After all, screenshots are usually taken using keyboard shortcuts, so there's no application you can set preferences in, and no preference pane within the System Preferences for setting the screenshot defaults.
As is the case with many of Mac's system defaults, you can use Terminal to change the default file format for screenshots. I’m going to show you in detail how to change the default screenshot format to JPG, and then provide you with a slightly simplified version for the four remaining image formats.
- Launch Terminal, located at /Applications/Utilities.
- Type or copy/paste the following command into the Terminal window. The command is all on a single line, but your browser may display this page with the Terminal command broken into multiple lines. While you can type in the command, the simplest thing to do is to take advantage of one of Mac’s copy/paste secrets: place your cursor on any word in the command line below and triple-click. This will select the entire line of text, at which point you can paste the text into Terminal without fear of making a typo.
-
defaults write com.apple.screencapture type jpg
- After you enter the text into Terminal, press the return or enter key.
- The default screenshot format has been changed, however, the change won’t take effect until you restart your Mac, or, since we have Terminal open, we can tell the system user interface server to restart. We will do this by issuing the Terminal command below. Don’t forget the triple-click trick.
-
killall SystemUIServer
- Press the enter or return key.
- The process for changing to the TIFF image format is the same as the method we used above for JPG. Just replace the Terminal command with:
-
defaults write com.apple.screencapture type tiff
- Don’t forget to press enter or return, as well as to restart the system user interface server, just as you did for JPG.
- Use the following Terminal command to change the default format to GIF:
-
defaults write com.apple.screencapture type gif
- Press enter or return. Be sure to restart the system user interface server as we did in the first example, above.
- To change to the PDF format, use the following Terminal command:
-
defaults write com.apple.screencapture type pdf
- Press enter or return, and then restart the system user interface server.
- To return to the system default of PNG, use the following command:
-
defaults write com.apple.screencapture type png
- Press enter or return; you know the rest.
Now that you know how to set the screenshot format, how about stopping the screenshot system from dumping the images onto your desktop, where they tend to clutter things up?
Once again, Terminal comes to the rescue with another secret command. And since you're now a pro at using Terminal for basic commands, I’m going to just give you the command and a tip or two:
defaults write com.apple.screencapture location ~/Pictures/Screenshots
The command above will cause the screenshot utility to save the screenshots to a folder named Screenshots that we created in our Pictures folder. We chose that location because Pictures is a special folder that Apple includes in the Finder sidebar, so we can quickly navigate to it.
You can change the location to be anyplace you like, just make sure that if you're going to create a special folder to store your screenshots, that you create the folder first. With the folder your planning to use already present you will find the easiest way to get the location path correct is to take advantage of a Terminal secret: any Finder item you drag into Terminal is converted to the actual path name.
- So, simply create a folder in the Finder where you wish to have your screenshots stored, and then enter the screenshot location command below in Terminal, without the ~/Pictures/Screenshots text that was in our personal example:
-
defaults write com.apple.screencapture location
- Now drag the folder you created in the Finder to Terminal, and the path will be appended to the end of the command. Press enter or return, and your new location for saving screenshots will be set.
By setting the default screenshot graphics format to one of the file formats you use the most, and setting the location for saving the screenshots to, you can really streamline your workflow.