Let's examine a typical scenario. A typical website may contain a header image and some content images below the header. The header image will likely span the whole of the width of the header, and the content image will fit somewhere inside the content column. Here's a simple example:
This works well on a wide screen device, such as a laptop or desktop (you can see the example live and find the source code on GitHub.) We won't discuss the CSS much in this lesson, except to say that:
However, issues arise when you start to view the site on a narrow screen device. The header below looks OK, but it's starting to take up a lot of the screen height for a mobile device. And at this size, it is difficult to see faces of the two people within the first content image.
An improvement would be to display a cropped version of the image which displays the important details of the image when the site is viewed on a narrow screen. A second cropped image could be displayed for a medium-width screen device, like a tablet. The general problem whereby you want to serve different cropped images in that way, for various layouts, is commonly known as the art direction problem. In addition, there is no need to embed such large images on the page if it is being viewed on a mobile screen. And conversely, a small raster image starts to look grainy when displayed larger than its original size (a raster image is a set number of pixels wide and a set number of pixels tall, as we saw when we looked at vector graphics). This is called the resolution switching problem. Conversely, it is unnecessary to display a large image on a screen significantly smaller than the size it was meant for. Doing so can waste bandwidth; in particular, mobile users don't want to waste bandwidth by downloading a large image intended for desktop users, when a small image would do for their device. Ideally, multiple resolutions would be made available to the user's web browser. The browser could then determine the optimal resolution to load based on the screen size of the user's device. To make things more complicated, some devices have high resolution screens that need larger images than you might expect to display nicely. This is essentially the same problem, but in a slightly different context. You might think that vector images would solve these problems, and they do to a certain degree — they are small in file size and scale well, and you should use them wherever possible. However, they aren't suitable for all image types. Vector images are great for simple graphics, patterns, interface elements, etc., but it starts to get very complex to create a vector-based image with the kind of detail that you'd find in say, a photo. Raster image formats such as JPEGs are more suited to the kind of images we see in the above example. This kind of problem didn't exist when the web first existed, in the early to mid 90s — back then the only devices in existence to browse the Web were desktops and laptops, so browser engineers and spec writers didn't even think to implement solutions. Responsive image technologies were implemented recently to solve the problems indicated above by letting you offer the browser several image files, either all showing the same thing but containing different numbers of pixels (resolution switching), or different images suitable for different space allocations (art direction).
Note: The new features discussed in this article — srcset/sizes/<picture> — are all supported in modern desktop and mobile browsers (including Microsoft's Edge browser, although not Internet Explorer.)
/en/word2016/page-numbers/content/ IntroductionAdding pictures to your document can be a great way to illustrate important information and add decorative accents to existing text. Used in moderation, pictures can improve the overall appearance of your document. Optional: Download our practice document. Watch the video below to learn more about how to add pictures to your documents. If you have a specific image in mind, you can insert a picture from a file. In our example, we'll insert a picture saved locally on our computer. If you'd like to work along with our example, right-click the image below and save it to your computer.
To resize an image, click and drag one of the corner sizing handles. The image will change size while keeping the same proportions. If you want to stretch it horizontally or vertically, you can use the side sizing handles. Page Break Changing text wrapping settingsWhen you insert a picture from a file, you may notice that it's difficult to move it exactly where you want. This is because the text wrapping for the image is set to In Line with Text. You'll need to change the text wrapping setting if you want to move the image freely, or if you just want the text to wrap around the image in a more natural way. To wrap text around an image:
Alternatively, you can access text wrapping options by selecting the image and clicking the Layout Options button that appears. If the alignment guides do not appear, select the Page Layout tab, then click the Align command. Select Use Alignment Guides from the drop-down menu that appears. Using a predefined text wrapping settingPredefined text wrapping allows you to quickly move the image to a specific location on the page. The text will automatically wrap around the object so it's still easy to read. Inserting online picturesIf you don't have the picture you want on your computer, you can find a picture online to add to your document. Word offers two options for finding online pictures.
When adding images, videos, or music to your own projects, it's important to make sure you have the legal rights to use them. Most things you buy or download online are protected by copyright, which means you may not be allowed to use them. For more information, visit our Copyright and Fair Use lesson. Challenge!
/en/word2016/formatting-pictures/content/ |