Return to Digital Photography Articles

Photoshop Save As vs Save For Web

One of the more confusing options in Photoshop CS2 arises when it comes time to save your edited image. There are two methods to save your photo: using the Save As dialog box or using the Save For Web dialog box. This article answers the question: what are the differences between save for web and save as, and when should I use Save for Web?

Photoshop offers two options to save your image after editing:

  • File -> Save As ...
  • File -> Save For Web ...

Both of these menu otpions create an output JPEG file from your working image, but they differ in both the available options, flexibility and representation of JPEG compression quality.

Quick Choice

If you plan to... You should use
Create images for your website,
or optimize the file as small as possible
Save For Web
Share images with others,
and you want viewers knowing shot time/date, etc.
Save As
Share images with others,
and you do not want others knowing shot time/date, etc.
For example, stock photos, or concerns over privacy
Save For Web

Convert your image to a given file size,
or you want interactive feedback on quality settings

Save For Web
... for all other cases Save As

Photoshop Save As

The Save As dialog includes a very large number of output file formats, as it is the standard method by which users will generate their final image files. As this output method is not optimized towards transmission over a low data-rate medium (such as the internet), additional information is encoded into the resulting image at the cost of increased file size. As shown below, this additional data may consume approximately 40KB.

One of the main reason that photographers choose Save As instead of Save for Web when sharing photos is so that the EXIF metadata (which includes camera information and shot details) can be displayed to other interested viewers. Most photo sharing sites (such as pbase) automatically extract this EXIF information, for the benefit of other photographers. However, considering that it also includes the time and date of the original shot, it may have privacy implications.

16-bit Mode

As Save As does not support for 16-bit images, it may be necessary to convert to 8-bit first, save and then undo the color depth conversion step if you plan to continue working on the file. You can convert to 8 bit RGB by selecting Image -> Mode -> 8-bits/channel. Save for Web automatically converts the color depth for you.

Photoshop Save For Web

The Save For Web dialog box doesn't provide as much flexibility in the ouput image file formats as the Save As dialog, but it does offer more flexibility with each supported option. Supported output file formats include:

  • JPEG - Selection of Quality level (1-100). No transparency.
  • GIF - Different palette sizes (2-256) and dithering options define quality. Supports single-bit transparency.
  • PNG-8 - Reduced color depth (2-256 colors) and dithering options defines quality. Supports multi-bit transparency.
  • PNG-24 - "Lossless" 24-bit quality. Supports multi-bit transparency.
  • WBMP - Black & White dithered output.
Main window for Save for Web

The focus on this page will be on the JPEG output format.

Save For Web JPEG output

Because the Save for Web command is intended to be used for images that are destined for display on the internet, one of the primary goals is in optimizing the file size as much as possible while still retaining acceptable image quality. To this end, two methods are used to achieve this: a) a live preview of changing JPEG compression quality sliders and b) the removal of all unnecessary metadata (JPEG markers) in the output file.

The main features in Save for Web include:

  • Optimize to File Size: Ability to automatically select both the file format (JPEG or GIF) and JPEG compression level to achieve the selected file size.
  • Removal of EXIF metadata. For many this is a useful feature, while others will completely avoid Save for Web because of it. For simple images on a web site or for privacy reasons, you may want to hide the time/date a photo was taken, or other parameters. But, if you plan to share your images on a photo hosting site and would like to indicate the focal length, aperture and other parameters to your viewers, Save for Web will not be the right method.
  • Removal of Optional Markers. In most output JPEG files, special markers are used to indicate additional information or provide resiliency in the case of errors / corruption. The Save for Web method will remove these and still allow JPEG decoders to work.

ICC Color Profiles

Both Save for Web and Save As give you the option of including the ICC Color Profile within the image. Color profiles are used to the viewer's display how the RGB values within the image data should map to real-world colors. Assuming you have a color-managed environment (calibrated and profiled monitor), this profile is used to display the colors as they were intended to be shown.

Unfortunately, most web browsers don't read this profile and most people don't have calibrated monitors, so the default color space, sRGB is generally assumed. Therefore, if you are sharing your photos on the web, and your photos were shot in a color space such as Adobe RGB, it is strongly advised that you convert to sRGB first. Once you've done that, there is little need to include the ICC profile within the file.

Comparison of JPEG Markers

The differences between the output of the two JPEG compressed file saving methods is easily visible when comparing the JPEG (JFIF) files themselves. The JPEG (JFIF) file format specifies a number of mandatory markers as well as some optional ones. The chart below shows how Photoshop CS2 Save as and Photoshop CS2 Save for the Web compare at a low level, with the help of JPEGsnoop:

Comparison of JPEG Markers in Photoshop
Save AsSave For WebDescription
SOISOI Start of Image marker
APP0 APP0 Identifier, Version, resolution, JFIF extensions
APP1   EXIF data, Makernotes removed in both. (length ~ 5KB)
APP13   Photoshop IRB (Photoshop-specific data, including quality) (length ~5KB)
APP1   XML metadata (EXIF, IPTC, etc.) (length ~17KB)
APP2* APP2* ICC color profile (* optional) (length ~3KB)
  APP12 Ducky tag - Save for Web Quality - stores the quality level (length 17B)
APP14 APP14 Encoding info: color transform (e.g. YCbCr, YCCK, RGB, CMYK) and whether or not the samples were blended (length 14B)
DQT DQT Quantiation Tables
SOF0 SOF0 Baseline DCT, chroma subsampling
DRI   Restart Intervals - Adds a level of recovery in case of errors (length is variable, depends on frequency)
DHT DHT Huffman compression tables
SOS SOS Start of Scan: Image Data stream
EOI EOI End of Image marker

As can be seen in the above table, the additional data stored within a Save As JPEG versus as Save for Web JPEG is typically in the order of ~ 40 KB. In most high-resolution photos, this extra is insignificant, but when trying to compress small images for web use, this overhead could be significant.

Extraction of Quality Setting in Save As

In files generated using Save As, you can derive the quality setting from the Photoshop IRB resource (0x0406) in the JPEG APP13 (0xFFED) marker. The following hex view is of an image saved with quality setting 2.

ValueQuality
0xFFFDQuality 1 (Low)
0xFFFE Quality 2
0xFFFF Quality 3
0x0000 Quality 4
0x0001 Quality 5 (Medium)
0x0002 Quality 6
0x0003 Quality 7
0x0004 Quality 8 (High)
0x0005 Quality 9
0x0006 Quality 10 (Maximum)
0x0007 Quality 11
0x0008 Quality 12

Extraction of Quality Setting in Save For Web

In files generated using Save For Web, you can derive the quality setting (1..100) from the Ducky resource in the JPEG APP12 (0xFFEC) marker (starts with null-terminated ASCII string Ducky). The percent value is stored in hex. The following hex view shows a file saved with quality setting 51 = 0x31:

Comparison of Save As vs Save For Web Quality

Many people are confused about why there is a difference in the definition of quality settings within Photoshop and furthermore, how they compare. The following table shows the two methods and the relative ordering of quality between the settings, from best to worst quality. See description below for the limitations of such an ordered comparison.

For more information: read about JPEG chroma subsampling.

MethodJPEG Quality Preset Chroma Subsampling
Save For Web100 Maximum 1x1
Save As12 Maximum 1x1
Save For Web 90   1x1
Save As 11   1x1
Save For Web80 Very High 1x1
Save As 10   1x1
Save For Web 70   1x1
Save As 9   1x1
Save For Web60 High 1x1
Save As8 High 1x1
Save For Web 51   1x1
Save For Web 50   2x2
Save As 6   2x2
Save As 7   1x1
Save As5 Medium 2x2
Save For Web 40   2x2
Save As 4   2x2
Save As3 Low 2x2
Save For Web30 Medium 2x2
Save As 2   2x2
Save For Web 20   2x2
Save As 1   2x2
Save For Web10 Low 2x2

 

In graphical form, here is a chart that shows a comparison of the JPEG luminance and chrominance across the default presets, each with the equivalent JPEG standard "quality factor". Of course, it is important to note that the quality factor shown is not an accurate measure of image quality since they are only truly comparable quantities if both Save for Web and Save As were based on linear scalings of the quantization tables included in the JPEG Standard Annex. Since neither is based on the sample tables, the quality factor should only be taken as a very rough comparison measure. The graph is ordered by decreasing luminance quality factors.

Ordered Graph

 

Comparison Graph

 


Reader's Comments:

Please leave your comments or suggestions below!
2008-04-25Dennis
 Just wondering why when you save for web as a jpeg on an individual file you get a smaller file size than if you created an action with a save for a web jpeg with the same settings then batched the file you the same file only 2k to 5 k larger.
 I think you'll probably find that the save options used in the batch process were slightly different than those in the manual save. To determine what is causing these differences, run JPEGsnoop on the two files and compare. Let me know what you find.
2008-03-28mac user
 I was wondering if anyone can help me resolve this issue: when I save for web on the mac, the web image comes out a lot more washed out than the image I am working with (jpeg file). How can i save for web and get it to look that same as the jpeg image? Urgently need help on this issue. Does anyone have a solution?
 It sounds like you are experiencing a problem with the use of color profiles. Your original JPEG image is probably ICC-tagged (eg. with Adobe RGB or other color space), which means that it has a color profile built-in (which determines how the colors in your image should be displayed by a color-managed system). When you save for the web, the color profile information is deleted and you are left with an untagged image. The default for all untagged images is assumed to be sRGB, and is what most web browsers will assume when displaying images.

This is a confusing topic, and so you may want to do a little searching on the web on color profiles to understand the issues better.

In the meantime, you might want to try converting the color profile of your image, by going to Edit->Convert to Profile... and then selecting sRGB as your Destination Space. If you see that the Source Space is set to something other than sRGB, then this is likely the issue.

Another thing to keep in mind is that the Mac and Windows computers differ in the gamma setting, which can impact the way colors are being rendered. Over-simplified, the gamma defines how your monitor's brightness levels are used. ImageReady can emulate the Mac to Windows or Windows to Mac appearance changes.

Good luck!
2007-04-03Anonymous
 I was just wondering why some images I was editing saved as 10x the filesize as the original. Then I tried save for web and it fixed the problem -- I found this page while Googling for confirmation. I'm incredibly embarrassed for not knowing this until now because I've been building sites for years and half the time I've just used save as out of habit/laziness.

You've got a very handsome color palette here, by the way.
2007-03-14Anon
 I think there's a mistake in the table: Save As 7 doesn't employ chroma subsampling. It's the first one that doesn't. It has more quantization than 6 though.
 Thanks for noticing it -- I had it correct in other places but missed it here. I've now changed it accordingly.
 
2007-01-21Kevin
 A photo I just tested is 82K when saved as, but only 55K when saved for Web. Nice. On the other hand, the saved-for-Web photo is slightly blurrier. How does Photoshop know how much to sharpen (or unsharp mask) when it resizes within Save for Web? In a second test, I resized and unsharp-masked the photo first, then saved both ways. The two photos looked nearly identical, but one is still 25K smaller. Do you suggest resizing and sharpening the photos before saving for Web?
 When you are using Photoshop's Save for Web and you plan to resize the image (using the Image Size tab), then no sharpening is applied unless you specifically ask for it. Below the New Size options you'll see a drop-down menu for Quality that gives you options of: Nearest Neighbor, Bilinear, Bicubic Smoother, Bicubic, Bicubic Sharper. These specify the interpolation / extrapolation algorithm and any sharpening or smoothing that is applied afterwards.

When you are resizing down, users will often choose to use Bicubic Sharper (which not only uses the bicubic algorithm for interpolation, but then follows it up with a preset USM, unsharp mask). The sharpening after reduction is often applied, even if the original image had some sharpening. The disadvantage of doing this is an increased file size (due to an accentuation of higher-frequency content) and sometimes moire. As for how much sharpening is applied, it uses a predefined Amount, Radius & Threshold, so you have little control over this process. If you want more control, then I would suggest that you do the resizing in Photoshop (not the Save for Web dialog box), then apply USM as you wish, and then finally use the Save for Web dialog box to further optimize your file size.

All that aside, what you may be noticing when comparing the two modes (Save As vs Save for Web) is the fact that they use different levels of compression! As shown on this page, the quantization tables (which define the level of compression to use when saving as JPEG) are very different in Save As vs Save for Web. Therefore, the fact that you are seeing a blurrier version in Save for Web is likely due to the fact that the Quality preset (0-100) is set too low for you. Increase the quality setting and at some point you should find the image quality to be comparable.
2006-12-06howard
 thanks for the great information. a follow-up question:

have you played around with graphic converter? my friend says they let you keep the iptc info and still save for web with a small file.
 I'm not familiar with Graphic Converter (there seem to be a couple products out there with this name, one for Mac, another for Windows, etc.). It is a little surprising that Photoshop's Save For Web doesn't provide an extra checkbox option to preserve the EXIF / IPTC metadata, but I suppose they figure that is what you should be using the normal Save As functionality for. Nonetheless, there are bound to be many cheaper alternatives available if you don't already own Photoshop.
2006-10-28howard
 just wondering if there is a way to retain copyright info when you save for web? this seems really crucial. when i saved for web my file lost the copyright line and was 40k. when i opened the file to add copyright it went up to 136k.

btw - i was also surprised that save for web threw out the rgb profile. i thought srgb was the best for web use?
 When it comes to metadata, it's generally all or nothing. If you want to preserve the copyright details, you'll probably have to use Save As instead. The other alternative is to use Save for Web and then run a tool such as Exifer to update the metadata of your files on a batch basis afterwards (easy to do for copyright info).

As for the color profiles, both Save As and Save for Web give you the option of including the ICC profile. Remember that sRGB is the standard profile used for web display, so there is very little need to include the profile if it is already in sRGB.

 


Leave a comment or suggestion for this page:

(Never Shown - Optional, if you want a reply)
 

NOTE: I am out of the country for several months (in India), so comments will be held and only posted infrequently. Thanks!

8 users online