Home » Image Optimization
Blog offering website designing, website development, digital media marketing, social media strategies, facebook application development and services for online branding.
On the surface, saving images for the web can be a pretty straightforward process. However, if you dig deeper there’s a wealth of information and techniques you might be missing out on.
This article will focus primarily on the diverse features of Photoshop’s “Save for Web & Devices” command along with some best practices related to saving images that are optimized for web use. We’ll start extremely basic for all the beginners, but there will be plenty of advanced information for the seasoned veterans as we progress.
Preparing images for the web doesn’t start at saving. It’s a good idea to check out a few things before you go into the Save for Web dialog.
First, you’ll want to have a look at your image mode. When designing for the web or any other on-screen media, you’ll want to make sure your images are formatted in RGB. Traditionally, CMYK is reserved for print. This is because there is a fundamental difference between creating colors with light vs. simulating colors with ink. While printers use tiny dots containing only one of four colors (Cyan, Magenta, Yellow or Black) to create the illusion of other colors, screens are capable of producing millions of colors.
Furthermore, RGB is an additive system, meaning the result of greater amounts of color is white. Conversely, CMYK is a subtractive system, meaning the lack of any color is white (the color of most paper) and colors are added to approach black. Additive systems are capable of producing much brighter colors across a wider spectrum.
The key information here is that for on-screen graphics, you can’t beat an RGB image.
Keep this in mind at the very start of a project, especially if you’re creating web graphics with Photoshop. Starting in an RGB workspace is far better than working with CMYK and converting later, which can create mottled gradients and muted colors. Photoshop’s Save for Web command will automatically convert CMYK images to the appropriate color system based on your choices in the dialog, but you’ll definitely want to know and consider the original color mode of the image before you even enter the dialog. If you don’t know the color mode of a given image, look in the menu bar under Image > Mode.
The second thing you’ll want to consider is the size of the original image. If your image is too large, hitting “Save for Web” will give you this warning:
Essentially, Photoshop is telling you that your image is not only way too big for most web uses, but is also larger than the Save for Web command was created to handle. If you click “proceed” Photoshop will in fact go through with the save. However, the dialog and included commands can be painfully sluggish due to the size of the file, depending on your computer system resources. It’s a good idea to downsize large files before entering the Save for Web dialog to prevent any problems.
Once you have your color mode and image size all squared away, hit Cmd/Ctrl + Shift + Alt + S on your keyboard to bring up the Save for Web & Devices dialog.
If you’re not familiar with this dialog, it can look a bit overwhelming at first. In fact, even if you’re a time-tested Photoshop professional but don’t possess CS4, things are going to look a bit different as Adobe has completely redesigned this menu.
Everything in here is important, but you’ll find there are a few key features that you will use most often, highlighted below.
In the bottom right of the window, you should see a section labeled “Image Size”. This section is pretty straightforward and works just like it did in previous versions of Photoshop.
You can choose to set the dimensions using either pixel height/width or by simply typing what percent of the original size you want your image to be. As you adjust these numbers, pay attention to your image preview as it will update to reflect the changes.
The most complicated part of this section is the Quality drop down menu. If you open it up, you’ll see that you have the choice of selecting Nearest Neighbor, Bilinear, Bicubic, Bicubic Smoother, or Bicubic Sharper. Each of these reflects a different method of pixel interpolation.
Resizing an image with only basic interpolation simply enlarges/reduces the pixel data and can produce some pretty ugly results. To prevent this, Photoshop attempts to manipulate the way the pixels are interpreted as the size of the image changes.
Unfortunately, there is no best solution for every image and Photoshop isn’t smart enough to decide which mode is best for a given image. By default, Bicubic is selected. This is generally good enough for most beginners and is in fact the most complex method. However, if you really want to learn to maximize your output, check out the brief explanations of the pros and cons of each method below.
Nearest Neighbor: This setting is the most basic interpolation mode and seeks to preserve the hard edges in an image by simply enlarging or reducing the pixel data as mentioned above. This may be good if your image doesn’t contain many gradients but will produce an over-aliased, pixelated image if you are significantly changing the size.
Bilinear: Slightly more intelligent than Nearest Neighbor and uses a weighted average of the 4 nearest pixels to increase the number of pixels. This method produces an anti-aliasing effect which eliminates harsh pixelated edges but can produce a blurry image as a result.
Bicubic: Bicubic is the most complicated method and samples from the nearest 16 pixels. As with bilinear, this method results in anti-aliasing to keep out any unwanted artifacts.
There are three versions of the Bicubic method in Photoshop: Bicubic, Bicubic Smoother and Bicubic Shaper. To get a hint for when to use each, we’ll look to another part of Photoshop. Close the Save for Web dialog and go the menu bar under Image > Size > Image Size. Now look under the “resample” dropdown menu and you’ll find some familiar options.
This time we see that each option (except Bilinear) comes with a little tip regarding when to use it. We can now see that each Bicubic option has a strength: Bicubic is best for creating smooth gradients, Bicubic Smoother is best for enlargement and Bicubic Sharper is best for reduction.
Always keep these tips in mind when resizing images within the Save for Web dialog. However, don’t blindly follow them without examining the results of each to decide which option is best for a particular image.
Near the top right of the window you’ll find the settings to choose which type of file you want to output along with various options pertaining to the quality of the output.
As you adjust these settings, you’ll obviously want to keep an eye on your image preview, but just as important as the way the image looks is the information directly under the preview pertaining to the image size and approximate load time.
Remember that there is always a trade-off between quality and file size. As a beginner, you may be tempted to choose quality over size and shoot for the maximum, but this is a big mistake that can cause your sites to load painfully slow. As you can see in the images above, by default my file size is coming in at nearly 1.3 MB. This is much larger than is preferable for most web images. With only a few size and quality adjustments, I can easily knock this down to around 20 KB (a much more preferable size).
There are three main file types we’ll want to focus on for saving images optimized for the web: GIF, JPG and PNG. Each file type has its own strengths and weaknesses and it is very important to know and keep these in mind when saving an image. We’ll start with the most complicated: GIF.
GIFs are popular for simple web-based graphics because of their relatively low file size. However, GIFs are restricted to a mere 256 colors and should therefore be used very selectively. Many designers will point out that photographs should not be saved as GIFs because of the millions of colors necessary to recreate a “real life” scene. This is definitely correct but does not give you the freedom to use a GIF on all non-photographic elements. For instance, the “six revisions” graphic that we’ve been using thus far was created in Photoshop and is therefore non-photographic, but it is still a very poor candidate for a GIF file. Check out the close up below of the text highlight using GIF compression:
As you can see, even with the highest number of colors enabled, the gradient from white out to red is pretty mottled. However, this definitely does not eliminate GIF as a useful file format. There are plenty of times when you’ll save an image such as a logo that may only have a few colors in it. Anything with large areas of solid color and very minimal gradients should look great as a GIF. For instance, if our image were changed to look more like the one below, we’d have a lot more freedom over which file type to use.
As you can see, the above image is fairly simple and shouldn’t even require the full 256 available colors. With GIF selected as the file type in the Save for Web dialog, you’ll have several options for how many colors you want to use ranging from 2 to 256.
Obviously, 2 colors is far too few to create a nice image. However, 256 looks a bit like overkill because our 16 color version is coming in so nice. This version comes it at a mere 7K while a JPG of similar quality would push us up to more than double that at 16K.
Other ways to reduce the file size of a GIF include reducing or eliminating any dither, adjusting the color palette settings (perceptual, adaptive, etc) and increasing the lossy compression. It would take at several more paragraphs to do these options justice so I’ll just encourage you to adjust these settings while watching the file quality and size to attempt to find an ideal result.
As I mentioned before, JPGs are going to be your best bet when working with photographs or graphics containing complex effects like shadows, gradients, etc. Because of the wide range of colors available in a JPG, you don’t have to worry about selecting a color palette. This just leaves the basic quality settings to adjust.
To adjust the image quality, either use the “Quality” slider on the right, or the present dropdown on the left (ranging from low to maximum). Again, remember to keep an eye of both your image preview and file size as you sample different settings. As you can see in the image below, there’s a wide gamut of quality between the lowest and highest settings.
Notice that as the quality decreases, it’s not just the hard edges that suffer but also the gradients as well. The graceful degradation from one color to another becomes a sloppy mess with clearly identifiable steps of color. However, at the largest size we’re pushing 90K, which is a bit unnecessary for this small image. You’ll find that the best solution is almost always somewhere between the lowest and highest settings. Try to find the lowest quality setting that doesn’t significantly degrade the finer visual details of your image.
Tip: By increasing the “Blur” option when saving a JPG, you can reduce file the size. However, only do this to the degree that it doesn’t significantly degrade the quality of your image.
Photoshop gives you two options when working with PNGs: PNG-8 and PNG-24. If you bring up the PNG-8 options, you’ll see that they are very similar to the options we saw for GIFs. Again we are back to choosing the number of colors up to a maximum of 256. This means that PNG-8 is limited to the same types of simple files that you would use for GIFs. Sometimes using a PNG-8 over a GIF can give you a smaller file size at a nearly identical quality. It’s best to experiment with both to see which provides a better result
PNG-24 on the other hand, provides a much higher quality image. PNG-24s retain much of the original PSD image quality and can handle transparency much better than a GIF.
As you can see in the image above, the shadow quality is fairly high and would look just fine dropped onto a solid background in an HTML file. However, there are two big downsides to using PNGs. The first is file size; notice that for the 550px wide PNG above the file size in 40.9K. This isn’t too bad for most modern internet connections but it’s a lot larger than an equivalent JPG or GIF and can really bog down a web page with a lot of images. The final and even more serious downside of using transparent PNGs is that they are not supported by all major web browsers. Nearly every professional web designer is aware of this and either ignores it in defiance of all users who won’t update their browsers, avoids using PNGs altogether, or comes up with clever hacks to trick browsers such as IE6 into submission. No matter which method you choose to live by, be sure to make an informed decision before leaving behind any visitors. If you already have a site, use Google Analytics or some equivalent to track the percentage of visitors you’re getting with browsers that don’t support PNGs. This allows you to make the best decision to cater to your current user base.
By now you may be feeling a bit overwhelmed with the number of options available for saving images for the web. You might be thinking that switching between various options is too time intensive and that comparing those options accurately is nearly impossible without saving out a version of each. Fortunately, Photoshop eases these concerns by allowing you to see multiple options at the same time. In the top left corner of the Save for Web dialog, you’ll notice 4 tabs labeled Original, Optimized, 2-Up and 4-Up. These are often overlooked by designers but are extremely helpful in deciding on the optimized settings for a given image.
Viewing both the Original and Optimized tabs will give you a single image preview. The principal difference is that Original allows you to see the unaltered PSD while Optimized lets you see what the image will look like after it is saved with the current setting.
These two tabs make saving images for the web a lot easier by allowing you to experiment with different options without losing settings. They both work exactly the same way and differ only in how many options you get to experiment with.
Each preview shows you the file type, size, quality and approximate loading time of the image with the settings pertaining to that selection. If you select a preview by clicking on it, you can change its settings on the right by using all of the methods discussed above. Then you can select another preview and change its settings for a quick visual comparison. You can compare across file types (JPG, PNG, GIF, etc) or within a given file type and limit the variation to quality settings. If you’re doing the latter, Photoshop can automate the task by automatically populating each window with a different setting so you can see which direction you want to go.
First select the type of file you think you’ll need, for instance: JPG. Then follow the picture above to locate the dropdown at the very top right of the Save for Web window. Click on this and go down to “Repopulate Views.” This will automatically fill each view with a JPG containing various quality settings. Just find the one with the most acceptable image clarity and file size and tweak the settings until you’re satisfied. This method makes it much easier for beginners to get a feel for the settings without spending a lot of time digging through them one at a time.
Web designers that handle most of the initial layout in Photoshop usually work in one of two ways. They either pull images out of the layout and crop/save them individually, or they use Photoshop’s built-in slicing tools to select and save different parts of the image.
If you’re the type of designer that frequently use slices, there area a lot of options in the Save for Web dialog to speed up your workflow. Using the Slice Select Tool (C), found in the upper left, you can select individual slices to work with (hold shift to select multiple slices). Using this method, you can change the settings of each slice. This means if you want your header image to be a GIF but your footer to be a JPG, it’s as easy as selecting each slice and assigning a file type. After you’re done, hit the “Save” button to bring up the save dialog. Here you can decide if you want to save all the slices in your image as individual files or just those that you have selected. Exporting all slices at once allows you to accomplish the feat of collecting all the images you need from your PSD layout in a single step. This can save you loads of time if you’re working with a complex site design.
The final feature we’ll discuss is using the Save for Web dialog in conjunction with slices to output an actual HTML file. To begin, slice up your PSD and bring up the Save for Web dialog. After you get the settings you want for each slice, go back to that dropdown in the very top right of the window and click on “Edit Output Settings.”
This should bring up a window that gives you options to adjust the settings for HTML, Slices, Background, and Saving Files. Using these options you can adjust whether you want to output XHMTL, what color you want your background to be, what naming convention you want to use, etc. Most of these options are pretty straightforward and don’t require further explanation but I will recommend though that you select “Generate CSS” instead of “Generate Table” under the Slices menu. Unless you are actually trying to create a table, modern web standards discourage using tables to generate a web page layout.
Finally, to export your sliced PSD as an HTML document, hit “Save” and select the option to export “HTML and Images.” Don’t expect to use this method to build an entire website in Photoshop. It’s simply meant to aid the process of exporting the images and marking them up in HTML. If you do most of the layout in Photoshop anyway, using the export HTML option can save you a lot of time setting up the initial HTML file. The downside is that there will be plenty of clean up to do to organize the code in your preferred manner. Consequently, most seasoned coders will prefer to skip this method entirely and code from scratch, but I encourage you to experiment with it to see if you can improve your workflow in any way.
The information above is more than enough to start you on your way to becoming a Save for Web guru. I hope you’ve learned a thing or two you didn’t know about Photoshop’s “Save for Web & Devices” dialog. Use the comment section below to let us know what you thought of the article. Also, there’s actually still plenty more to the dialog that we didn’t go over so feel free to point out any features that you use regularly that weren’t mentioned above.
I would like to say that a very big plus is a fact that these sites practically do not use your computer memory, so you can always be sure that none of your images will disappear. And you don’t have to worry about getting your computer crashed if you have slow one :)
Pixlr is a perfect online image editing application that is designed for non professional users and allows them to easily edit images. It combines image design and paint tools with photo editing and adjustment features more convincingly than any other online image editing program.
Major features:
Sumo Paint is an online image editing application similar to Adobe Photoshop.
Major features:
Splashup is a powerful editing tool and photo manager. With the features professionals use and novices want, it’s easy to use, works in real-time and allows you to edit many images at once. Splashup runs in all browsers, integrates seamlessly with top photo-sharing sites, and even has its own file format so you can save your work in progress.
Major features:
PicMagick is an online photo editor that enables you to make ordinary photos look wonderful within a few clicks. It will surprise you how fabulous your photos can be and how easily this can be done.
Major features:
Photoshop.com is the complete solution for managing, editing, storing, and sharing your photos online, with tutorials, inspiration, and more. Photoshop.com is available from any web-enabled computer, compatible mobile phones, and directly from within Adobe Photoshop Elements 7 or Adobe Premiere Elements 7 software. With Photoshop.com, you can organize, tweak, create, e-mail, display, and store your photos.
Major features:
pixer.us lets you manipulate, edit, enhance and apply filters to your digital pictures using only your web browser.
Major features:
Edit photographs with this online photo and graphics editing tool, which does much more than adjust brightness or remove red-eye. Aviary’s purpose is to “make creation accessible to artists of all genres,” including graphics and even audio editing. Phoenix is only one of many editors
Major features:
Picnik makes your photos fabulous with easy to use yet powerful editing tools. Tweak to your heart’s content, then get creative with oodles of effects, fonts, shapes, and frames.
It’s fast, easy, and fun.
Major features:
Snipshot is a fast online image editor. You can use it right from your browser, no downloads or Flash required.
Major features:
Lots of one-click options to edit your digital photos instantly.
Major features:
There are times when we look at a photo and we say it’s beautiful, but we can’t say why that is. That is great composition.
Composition is the most important thing in stock photography, but every stock agency has its own guidelines that you should carefully read and examine. Composition, quality and professionalism go hand in hand from a stock agency’s perspective.
Composition is not always as easy as adhering to several rules, because photography could be very subjective and photographers must use their creativity to transmit their messages through their photos.
As with every other aspect of stock photography, when you decide to take a photo for the purpose of submitting it to a stock website, you have to look at what others submitted and what works and what doesn’t.
Stock agencies always welcome fresh new angles in photos where a little creativity is put into that photo and not just the same old boring shot-from-the-front angle. The best way to find fresh angles is to experiment and always think of how you can improve the composition you’re about to shoot. If you’re shooting a flower, try to get on the same level as the flower or shoot far above it.
Of course there are a few rules to keep in mind that it will greatly help improve your chance to be successful with stock websites, but one particular rule tends to be more important than the rest:
According to Wikipedia the Rule of Thirds states that “an image should be imagined as divided into nine equal parts by two equally-spaced horizontal lines and two equally-spaced vertical lines, and that important compositional elements should be placed along these lines or their intersections”.
Essentially it’s not a good idea to put your subject in the center of your photo, because it would create a snap shot instead of a professional photo. Always to imagine these horizontal and vertical lines when taking shots.
“Tack sharp photos” is the term that photographers use when they talk about the sharpest photos that you can take with a camera and a lens.
These little things set the professional photographers apart from the amateurs and stock agencies love these.
If you’re thinking it’s not necessary to use a tripod to achieve tack sharp photos, then you’re on the wrong path. A tripod is essential for sharp photos.
You have to eliminate every little vibration of the camera that might prevent taking sharp photos, but using a tripod is not enough. Simply touching the camera and pressing the shutter button can cause tiny vibrations that will be transferred to the photo. To prevent this, use a cable release. Every digital SLR camera nowadays has this feature, so you can easily attach a remote control to it, either wired or wireless. If you don’t want to or cannot use a remote control, the next best thing is to use the camera’s self timer.
Now, the following statements may sound a little silly. If you set up your camera on a tripod and you have a lens with image stabilization or vibration reduction, turn this feature off.
Let me explain why: Manufactures created this feature for situations where your hand holds the camera, but in situations where the camera sits on a tripod and it’s absolutely still, you should turn the image stabilization off to prevent the lens from looking for vibrations in the image. By looking for vibrations, it creates a slight movement in the lens, enough to cause a distortion on the photo.
Many beginner photographers ask this question: What is the best file format for photographs? From a stock agency’s points of view, they recommend file formats that preserve the best quality of the photo.
There are a few commonly used file formats that are also available in digital cameras: Jpeg (JPG), PNG, TIFF and RAW.
The file format requirements usually varies on each stock photography website, but there are a few common steps that you should bear in mind in order to maximize your photo’s quality, which in turn will translate to a successful submission.
The RAW file format is the best to use when taking your photos, but stock agencies don’t accept it simply because it has several disadvantages: Firstly, the file size is too large. A typical RAW image file starts at around 14-15 MB. Secondly, each camera manufacturer’s RAW file format is different. It would be a tedious job for stock agencies to sort through these formats, therefore they simply don’t accept RAW files.
A RAW file preserves all of the information that the lens passes to the camera’s computer, everything from color space to EXIF information. Usually it’s the way to shoot the best quality photos and it’s also good for post processing too.
The Jpeg file format uses the lossy compression methods, meaning that not every piece of information is preserved when saving the photo, and it cripples the quality too, but stock agencies usually prefer this file format.
The best a photographer can do is to shoot photos in the RAW image format, post process it, tweak it and then convert it into a Jpeg with 100% compression quality.
For a quality photo, the post processing work should be the absolute minimal, of course not every time we can get away with beautiful photos, so we need to tweak it here and there.
I will present the most common problems that a photographer will encounter and how to fix them, in order to get submitted on stock photography websites.
To keep this problem to the minimal or non-existent, you should think of this before you shoot your photos by setting your camera to the lowest ISO speed.
ISO speed is the camera’s sensitivity to light, the higher this number the more sensitive the lens is. This number can range from as low as 50 to as high as even 8000 on really expensive dSLR cameras. If the ISO is set to a high number, the noise which appears on the photos won’t be acceptable for stock photo submissions.
Given the fact that that we can’t always set the lowest ISO considering weather conditions (e.g. rainy day, cloud shade, etc.) we could post process the image to reduce this noise and improve the photo’s overall quality.
Luckily Adobe Photoshop CS3 has a really good noise reduction filter. Consider this image:
In Photoshop go to Filter -> Noise -> Reduce Noise
Set the following values, strength 8, preserve details 75%, sharpen details 30%
The result is shown below. You can clearly see the image is smoother and the noise is reduced significantly.
This technique is fairly simple. You can find a more complex and effective method at cambridgeincolour.com/tutorials/image-averaging-noise.htm using the Image Averaging technique.
This is not really a post processing technique, but a good tip that you should always take into consideration. Always shoot at the camera’s highest resolution and you can then reduce the resolution if necessary in Photoshop. To do this, go to Image -> Image Size.
One important thing to mention here: don’t ever scale up your photos, because this will result in mediocre quality. Stock agencies will notice this and reject them.
I will show you a really cool trick that you can use to sharpen your photos by using the Unsharp Mask. The name is a little confusing, but this method works best for me and I consider this technique the best, because it’s easy to apply, resulting in significant improvements.
Let’s take the following image:
We need to change the Image Mode first, so go to Image -> Mode and choose Lab Color
Go to the Channels palette and select the Lightness channel. (If you can’t find the channels palette on the right then go to Window -> Channels to open that window).
Go to Filters -> Sharpen -> Unsharp Mask and adjust the values as you see fit.
Usually, for portraits, the following values works best for me: Amount 130%, Radius 1, Thresold 10
Switch the Image Mode back to RGB by going to Image -> Mode -> RGB. You can see the final result below.
