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, |
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 As | Save For Web | Description |
SOI | SOI | 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.
Value | Quality |
---|---|
0xFFFD | Quality 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 = 0x33:
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.
Method | JPEG Quality | Preset | Chroma Subsampling |
---|---|---|---|
Save For Web | 100 | Maximum | 1x1 |
Save As | 12 | Maximum | 1x1 |
Save For Web | 90 | 1x1 | |
Save As | 11 | 1x1 | |
Save For Web | 80 | Very High | 1x1 |
Save As | 10 | 1x1 | |
Save For Web | 70 | 1x1 | |
Save As | 9 | 1x1 | |
Save For Web | 60 | High | 1x1 |
Save As | 8 | High | 1x1 |
Save For Web | 51 | 1x1 | |
Save For Web | 50 | 2x2 | |
Save As | 6 | 2x2 | |
Save As | 7 | 1x1 | |
Save As | 5 | Medium | 2x2 |
Save For Web | 40 | 2x2 | |
Save As | 4 | 2x2 | |
Save As | 3 | Low | 2x2 |
Save For Web | 30 | Medium | 2x2 |
Save As | 2 | 2x2 | |
Save For Web | 20 | 2x2 | |
Save As | 1 | 2x2 | |
Save For Web | 10 | 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!You can add bytes yourself, the final byte is FF D9 - the encoder will stop reading there. Just add your copyright information after that.
Now, for a question of my own: Are there any means of easy compression signature alteration? While JPEGsnoop is a great tool when it comes to analyzing the compression, it doesn't allow any alterations. Is there a tool of equal complexity that allows a high level of manipulation? I'm mainly after some easy way of disrupting the compression signature data. I do realize that this has hardly any practical use, but I would appreciate all suggestions.
P.S. I have noticed a typo in the sentence "The following hex view shows a file saved with quality setting 51 = 0x31". There should be 51=0x33 instead, even the image below says so :)
I created a 1x1 pixel transparent GIF with PS, Saved for Web, and the file size is 14Kb. I think this is too much, isn't?
Regards,
Francisco
Thank you...
I learn a lot...
^_^
Thanks for the great info.
I'm having an sRGB issue in CS3 I can't resolve thought you might have ideas. My camera shoots in sRGB, I'm working in sRGB in CS3, however, when the sRGB profile is either stripped (or viewed in a non-Safari browser) the jpegs (which again never left the sRGB color space) get seriously washed out. If I leave the sRGB profile in they look great in Safari, strip it and yuck! Everything I've read seems to indicate that once you're in sRGB you should be able to strip the ICC profile without much trouble. Not the case here! What's going on? Is there anyway to have photoshop "apply" whatever the ICC profile is doing to an unprofiled image?
thanks!
The Batch process doesn't use Save For Web, it uses Save As. I'm guessing the Batch function doesn't support Export functions such as Save for Web. It simulates this with the closest Save As equivalent.
A manual Save For Web shows the App12 (Ducky) marker, but the Batch processed Save For Web output file shows the App13 (Photoshop 3.0) marker.
My manual Save for Web quality was set to 100. The same setting in the Batch translated to Save As quality 12.
The file sizes were 3768 bytes vs 8872 bytes.
Save for Web can't be used in a Batch if you want the most optimal size.
The Batch process doesn't use Save For Web, it uses Save As. I'm guessing the Batch function doesn't support Export functions such as Save for Web. It simulates this with the closest Save As equivalent.
A manual Save For Web shows the App12 (Ducky) marker, but the Batch processed Save For Web output file shows the App13 (Photoshop 3.0) marker.
My manual Save for Web quality was set to 100. The same setting in the Batch translated to Save As quality 12.
The file sizes were 3768 bytes vs 8872 bytes.
Save for Web can't be used in a Batch if you want the most optimal size.
Save for Web is preferable in the case that no ICC profile is embedded because there will be no ColorSpace tag at all, so sRGB is more likely to be assumed. If the ColorSpace property is "uncalibrated" then I'd worry that some software might assume non-sRGB even though there is no ICC profile.
Thanks for your interesting article.
There are options to save/remove selected APP data inside JPEGs (with or without compression), you do not really need to keep all of them increasing file size.
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!
You've got a very handsome color palette here, by the way.
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.
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.
btw - i was also surprised that save for web threw out the rgb profile. i thought srgb was the best for web use?
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.