Shadow on Website Images - Another Dimension!
Images are an integral part of your Website for several reasons. When you build a website, images provide; visual aesthetics; visual information; they improve your page design; helping to create a web page which is easy on the eye and encourages visitors to stick around longer; they are vital in making best use of one of the Reason8 Search Engine Optimisation processes, which entails all images being tagged with your top key phrase., etc., etc., etc. We looked at the various options you have when placing your images but we’ve recently been asked if it is possible to add a shadow to your images?
Absolutely, YES you can. You’ll need to add your shadow to your image with an Image Editing Programme before uploading it to your Image Library. It’s a great way to add extra dimension to your pages and really shows off your images nicely. Shadowed images really only work well on websites with a white background. The advantage here though is that if you have images with a white background, a shadow can make them appear to be floating straight off the page – as you can see here.
There are several Image Editing Programmes, one of the most popular being Paint Shop Pro. We’ll look at other programmes over the next few blogs but lets start with PSP for the first step by step. (This step by step was based on PSP Photo X but many of the functions are very similar in older versions of the programme.)
Adding a Drop Shadow
As mentioned above, shadow only really works well on websites with white or very light backgrounds. For very light backgrounds, you’ll need the colour HTML code before you start. (Paste a screen print / screen grab of your home page into your editing programme, then use the colour dropper tool to get the HTML code).
Open your image in your editing programme. Make sure it’s the right size for your web page. It should be less than 400 pixels wide, an average size would be somewhere between 150 - 300 pixels wide.
For a straight edged image:
We first need to give ourselves enough room to add our drop shadow, so Click - Image > Canvas Size and enter a size roughly 15-20 pixels larger than the original for both height and width. (If you hover your mouse over the original image, it’s size will be shown in the bottom right corner of your work window). Once you've set the new Width and Height, change the placement settings to show "0" in both top and left, as we only need the extra space right and bottom to accommodate the shadow. Select the same background colour as your website and click OK.
Next, using the "Magic Wand Tool" (on a tolerance setting of around 25), click to select the background - NOT the image.
Then go to: Selections > Invert. The Image should now be selected leaving the extra space outside the selection. (Alternatively, you could use the selection tool and carefully select the image yourself, making sure no background is included in the selection)
Now Click - Effects > 3D Effects > Drop Shadow > Select the best shadow size for vertical and Horizontal (guide: 3-5), Choose the Blur setting (guide: 7-10), choose a mid grey for the colour and click OK.
How does it look? To go back and tweak it, simply click Undo and change the shadow settings. Once you're happy. Cut away the excess white space and Click File > Export > Jpeg Optimiser (compression 1-3), click OK and save it in your preferred folder.
For a rounded or shaped image on a white or transparent background:
Using the "Magic Wand Tool" (tolerance setting 25), click to select the background - NOT the image. Don't forget to select any background, which shows through any gaps in the image - hold down the shift key to select multiple areas.
If the edge of your image isn’t very smooth, you can correct this by going to Selections > Modify > Smooth. Play about with the "Smoothing Amount" and the "Corner Scale" until you’ve achieved a nice smooth edge. With the new smoothed selection showing, click Ctrl C to copy, then right click and paste the new cut-out image anywhere onto the blank PSP workscreen. You should now have a nice smooth edged image with a transparent background. Make sure you have enough space to add your shadow. Then as before use the Magic Wand to select the background - NOT the image, again not forgetting any gaps.
Then go to: Selections > Invert. Selections > Modify > Contract by , to ensure a clean selection. The Image should now be selected leaving the background outside the selection.
Now Click Effects > 3D Effects > Drop Shadow and choose the best shadow settings.
Once you're happy. Cut away the excess white space and Click File > Export > Jpeg Optimiser (compression 1-3), click OK and save it in your preferred folder.
Now simply upload your new image to your Website and place on your pages in the normal way.