Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > Adobe Dreamweaver

This chapter is from the book

PROJECT 4.2 Inserting and Editing Images

  • star.jpg ACA Objective 1.2
  • star.jpg ACA Objective 2.4
  • star.jpg ACA Objective 2.6
  • star.jpg ACA Objective 4.2

You accomplished a lot in the first project. You’ve gotten some important page elements all set using background images and CSS styling rules to style the content areas of the page. Did you take the Level Up challenge? If you did, your header should also have a nice background image applied to it.

Now it’s time to turn your attention to inserting images into the body of the page. Luckily for you, Chris has provided all sorts of images for you, and he’s even optimized them and set the file types of the images properly so you can jump right into inserting the images. In this project you’ll use the tools that Dreamweaver provides for working with images in a website, try the editing options that are available, and follow some recommended practices for modifying images.

From your review of the design comp and the instructions the client provided, you know you have a lot of images to insert into the page.

Insert an Image Using the Assets Panel

The Assets panel is a great tool for situations in which you have many available images and want to identify which ones to use.

  1. If the Assets panel is not already open, select Window > Assets. By default, the panel appears in the same panel group as the Files and CSS Designer panels.

    The Assets panel makes it easy to sort through all the images in your site and displays a preview of the images at the top of the panel. You can slide the divider up or down between the preview area and the alphabetical list of files to see a smaller or larger preview. Figure 4.12 shows the functional areas of this panel.

    Figure 4.12

    Figure 4.12 The Assets panel with the Images category selected

  2. Scroll through the images to locate ray.png, and select it.
  3. Place your cursor in front of Ray’s introduction to the site (My name is Ray…), and click the Insert button in the Assets panel to place ray.png onto the page.

Scale and Size an Image

As soon as the image displays on the page (Figure 4.13), you can tell that you have a big problem. This image is way too large.

Figure 4.13

Figure 4.13 The Property inspector tools for setting image dimensions

When an image is selected, you’ll see a small, square resize handle appear in the image’s lower-right corner. You can scale the image by holding down the Shift key while dragging this handle. Or you can click the lock icon in the Property inspector to lock the aspect ratio and keep the image set to the proper width and height dimensions as you drag.

  1. Click the image, and drag the image’s resize handle to what you think will be the proper dimensions for this image.

    As you resize the image, dimensions will change in the Property inspector. Make note of those dimensions.

    When you resize or scale an image in this manner, you are changing the width and height that the browser will use to display the image. The image itself is not changed in any way, and most importantly, the file size of the image is the same as always. Placing a large image onto the page and then setting a smaller width and height is a waste of bandwidth. A smaller version of this image works better in this case.

  2. Undo your changes to the image so it returns to its original size, or click the Reset to Original Size button in the Property inspector.

    In the next steps, you’ll use a better method for editing an image that is too large for the page.

Duplicate and Edit an Image

Remember that smart designers never (ever!) destroy an original image. You might be tempted to open ray.png in Photoshop, change the image dimensions, save the file, and plunk the smaller version onto the page. But that kind of destructive process changes the file forever. You could never make the image larger again, and because you never really know how you might want to use this image in the future, it’s always better to keep the original file as it is and work from a duplicate of the file. The Adobe toolset makes this an easy process.

  1. Select the ray.png image, and press the Delete key to remove it from the page. You will not be using this file for this location.
  2. Click the Files panel, and expand the images folder.
  3. Select ray.png. Right-click, and choose Edit > Duplicate from the context menu (Figure 4.14).

    Figure 4.14

    Figure 4.14 The Files panel allows you to duplicate files and perform other basic file operations.

    A Expanded images folder

    B ray.png selected

    C Duplicate an existing file

    Notice the other basic file operations you can perform from the Edit menu.

    Anytime you duplicate a file in this way, Dreamweaver automatically appends the name with “ Copy.” In this case, Dreamweaver will create a file named ray - Copy.png, which you’ll see listed in the Files panel.

  4. Click twice—but not too fast—on the file named ray Copy.png. The filename is highlighted in blue. Change the name of the file to ray-smaller.png.

    This is the file you will use in your design, leaving the original image of Ray as it is, safe and sound.

  5. Drag the ray-smaller.png file from the Files panel, and drop it onto the page in front of the first sentence (“My name is Ray…”).

    The image is at its original size, but now you can safely edit this image without harming the original.

  6. With the image still selected in the page, click the Edit button in the Property inspector to open Photoshop (or the default image editor you set in Preferences).
  7. Resize the image, and save the changes you make in your image editor. In Photoshop, you can resize the image by choosing Image > Image Size. Set the image width to 90 pixels, and save the file.
  8. Return to Dreamweaver and note the appearance of the image. It’s still too big. The Property inspector still shows the original dimensions. To set the dimensions to the new, correct dimensions, click the Reset to Original Size button in the Property inspector (Figure 4.15).

    Figure 4.15

    Figure 4.15 Resizing an image in a graphics editor like Photoshop reduces the file size of the image and saves on bandwidth.

Notice that the image is displayed at the dimensions you set when working in your image editor. Also note the new file size of this image as shown in the Property inspector: only 33 Kb. You saved almost 60 Kb of unnecessary data that doesn’t have to be downloaded by a site visitor. And you saved bandwidth and made a backup of the original client artwork all at the same time. Good job!

Dreamweaver’s Image Editing Tools

Dreamweaver includes tools in the Property inspector for editing images and performing small adjustments directly in Dreamweaver. But be warned! These tools make permanent changes to the image once you save the Dreamweaver page you’re working on.

Figure 4.16 shows the location of these tools in the Property inspector. You can try these out for yourself, but be sure to choose Edit > Undo after you make each change so the file you are using isn’t permanently altered.

  1. Crop Image displays a crop area. Use the crop area handles to set the size of the area to be cropped. Double-click to crop the image.
  2. Resample Image button is used when you have changed the dimensions of an image and you want to improve its picture quality at its new size and shape.
  3. Brightness and Contrast is used to make small changes to how dark or light an image is and how sharply the colors in the image are defined.
  4. Sharpen adjusts the focus of an image by changing the contrast of pixel edges in the image.
Figure 4.16

Figure 4.16 Image editing tools in Dreamweaver as seen in Design view

Round-Trip Editing with Photoshop

Recall that at the beginning of this project you were told that smart designers always work from an original source file from Photoshop or Fireworks and never take actions that will destroy an original. However, web designers in particular never know where their artwork might come from or in what format. You might, for example, have the freedom to work from an original composition that you create in Photoshop, using all your own art and photos to compose something entirely new. Photoshop has awesome tools that let you compose an entire page layout and design in one PSD file and then export the images and CSS values for use in a web design project.

Web designers also have to work in a setting like the one you see here, where the client has provided artwork and instructions on how they should be used. Once you find that you need to modify an image in any way—changing its size, adding text, or even making color corrections to a photograph—you should create a source file so you can have a backup on hand in a format that lets you go back and make additional changes.

Dreamweaver provides a way to do this by allowing you to make round-trip edits from a source Photoshop file. Let’s see how that works.

  1. From the Files panel, expand the source folder and locate the file named ronni-original.psd.
  2. Drag the ronni-original.psd file onto the page at the end of the last bulleted sentence.

    Dreamweaver will display the Image Optimization window, where you’ll choose the appropriate image format for the file. For this file, you’ll continue to use PNG24 as the format to be saved.

  3. Click the drop-down arrow in the Preset field, and select the PNG24 option (Figure 4.17).

    Figure 4.17

    Figure 4.17 The Image Optimization window appears when you insert a PSD file in a page.

  4. Click OK to set the format, and Dreamweaver will open an Explorer or Finder window so you can save the image into its web-ready format. Browse to the images folder inside the Chapter 4 site, and save the file as ronni-edited.png.

    In the Property inspector, you’ll see that Dreamweaver is now tracking the path and filename of the source image used to create this version (Figure 4.18). The next time you click the Edit button, the PSD file will be opened in Photoshop and not the version that is on the page.

    Figure 4.18

    Figure 4.18 Source Photoshop files are tracked by Dreamweaver.

    Now look at the image itself. You’ll see a small icon in the upper-left corner of the image that indicates this is a version of an image that came from a Photoshop source file and is available for round-trip editing.

  5. Click the Edit button and the PSD file will open in Photoshop.

    Let’s look at a quick demonstration of how round-trip editing works.

  6. In Photoshop, choose Image > Image Rotation > Flip Canvas Horizontal. The cartoon character will rotate to face right instead of left.
  7. Save the PSD file, and return to Dreamweaver.

    Everything looks the same. No worries. To see the change you made in Photoshop, you have to tell Dreamweaver to update the image.

  8. Click the Update from Original button in the Property inspector (Figure 4.19).

    Figure 4.19

    Figure 4.19 The Property inspector when working with a round-trip image

    The character is now looking to the right, just as she is in the source file.

  9. Save the prototype.html file you’ve been working on. This project is complete.

You’ve just learned a lot about how images are inserted into web pages using Dreamweaver’s toolset. You’ve also seen how you can use Dreamweaver’s built-in image editing tools for making minor corrections to an image and how Dreamweaver and Photoshop can be used together in the recommended workflow, where the designer makes edits to a source PSD file that can be easily updated in Dreamweaver. And don’t forget to always back up your originals!

Peachpit Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Peachpit and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Peachpit products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email ask@peachpit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by Adobe Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.peachpit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020