Skip to Main Content

LibGuides Manual

Adding an Image and Changing Alignment

The primary way to add images to your guide is to link to items in the Library's digital collections. Once you've linked to an image you can change its alignment by editing the HTML.

Video Tutorials - Adding an Image and Changing Image Alignment

Begin by watching a short video tutorial that provides instructions for adding an image from the Library's digital collections to a LibGuide. This video is 03:11 in length.

Next, watch the video tutorial that provides instructions for changing image alignment. This video is 02:55 in length.

View all LibGuides Tutorials on the LS Training website.

Get the URL for the image and the “item record”

1. From the “item” record (e.g., https://loc.gov/item/89714223/), locate the “Download:” box. Open the drop-down menu and select the medium- or larger-sized JPEG image for the item:

Select the medium-sized image

2. When you select Go, the appropriate image will display on its own tab in your browser,. From there, you can block and copy the URL from the URL box:

Baseball image

You will need the image's URL in order to display the image in your guide..

Place the image in a Rich Text/HTML box

3. Edit an existing Rich Text/HTML box, or add a new box to the content area of your LibGuide in order to include an image.

4. If appropriate, add text to the box (if you are pasting text from Word, another guide, or an email, remember to use “paste as plain text”):

Adding an Image to a Rich Text Box

5. Place your cursor at the beginning of the paragraph where you want the top edge of your image to align/display (you may wish to press the Enter key to create so space). Select the Image button and the "Image Properties" dialog box will appear. The URL box is where you will paste the URL for the individual image that you want to include in your guide.

6. Paste the image URL into the URL box. Because you are not using a caption, you will need to provide “Alternative Text” describing the image. And, since the CSS will be controlling the size and position of the image, you will need to remove and “Width” and “Height” numbers that appears in those boxes:

Image URL

7. If you want your image to link to the URL for the "item record", or some other appropriate URL address, select the Link tab. Paste in the appropriate URL and select “New Window (_blank)” from the Target: drop-down menu.  Click OK from either this screen, or return to the previous tab (make sure no height or width appears) and then click OK

Image Link Tab

Add alignment to your image

8. Once you have included an image in the "Rich Text/HTML" box, you can now add alignment to the image. Select the Source button to display HTML code view.

Image Source Button

9. In the Source (HTML view), you will need to locate the tag that begins with “<img...“.  To size and align the image you will need to surround the <img> tag with one of the HTML <figure> tag options show below:

  • Align the image center with margins on the left and right
    <figure class="figure"><img src="..." /></figure>
  • Align the image left
    <figure class="figure align-left"><img src="..." /></figure>
  • Align the image right
    <figure class="figure align-right"><img src="..." /></figure>
  • Display the image the full width of the window
    <figure class="figure align-stretch"><img src="..." /></figure>

Examples of Images Without Captions

Center-aligned Image (with margins on left and right)

  • <figure class="figure">
    <img src="https://cdn.loc.gov/service/pnp/pga/03800/03898v.jpg" alt="Emancipation, by Th. Nast ; King & Baird, printers" />
    </figure>

Mollis at facilisis. Integer dolor pharetra. Dui dictum metus placerat sodales sed cras vehicula et consequat accumsan ornare hac velit pellentesque donec in tristique wisi faucibus mi. Vel quis quasi molestie in ullam nec accumsan suspendisse aliquet ipsum sed doloribus suscipit porttitor sed in vestibulum. Facilisi suscipit odio. Pellentesque ut pede. Natoque elit tincidunt. Felis nulla magnis. Natus in mi. Condimentum ultrices amet.

Image description

Mollis at facilisis. Integer dolor pharetra. Dui dictum metus placerat sodales sed cras vehicula et consequat accumsan ornare hac velit pellentesque donec in tristique wisi faucibus mi. Vel quis quasi molestie in ullam nec accumsan suspendisse aliquet ipsum sed doloribus suscipit porttitor sed in vestibulum. Facilisi suscipit odio. Pellentesque ut pede. Natoque elit tincidunt. Felis nulla magnis. Natus in mi. Condimentum ultrices amet.

Left-aligned Image

  • <figure class="figure align-left">
    <img src="https://cdn.loc.gov/service/pnp/pga/03800/03898v.jpg" alt="Emancipation, by Th. Nast ; King & Baird, printers" />
    </figure>
Image description

Lorem ipsum dolor. Sit amet donec justo feugiat nisl inceptos ipsum feugiat. Amet nulla ultricies. Aliquam ac vestibulum. Pellentesque facilisis est. Eget ac ut. In quis id. Nascetur odio diam turpis quam volutpat. Tristique ante sit faucibus proin maecenas at earum vitae. In tellus et et at purus posuere nec fringilla nulla leo ipsum maecenas mauris fusce. Mollis at facilisis. Integer dolor pharetra. Dui dictum metus placerat sodales sed cras vehicula et consequat accumsan ornare hac velit pellentesque donec in tristique wisi faucibus mi. Vel quis quasi molestie in ullam nec accumsan suspendisse aliquet ipsum sed doloribus suscipit porttitor sed in vestibulum. Facilisi suscipit odio. Pellentesque ut pede. Natoque elit tincidunt. Felis nulla magnis. Natus in mi. Condimentum ultrices amet.

Corrupti lorem curabitur dignissim in in. Quam vulputate massa eu amet a. Ligula dolor corporis. Dapibus nulla elit donec vel et lectus elementum erat. Nulla eu suspendisse. Sit vitae dolor eros deleniti ut. Faucibus viverra porta dolor in tincidunt. Turpis felis eros. Massa magnis sem wisi in malesuada. Erat aliquam vivamus maecenas praesent mattis cursus aliquet augue. Quam con consequat. Vestibulum cursus nulla mi amet cras. Vitae in vestibulum blandit sit arcu. Quis nonummy nisl amet in magna ligula sollicitudin tempor. Nunc in sit. Erat nisl dolor sociosqu porttitor fermentum enim lobortis tortor pharetra suscipit nibh nisl amet eget est nam pellentesque. Ipsum dolor tortor. Sollicitudin consectetuer dolor. Elementum ut integer tellus convallis lorem. Eu potenti dapibus erat massa sit.

Right-aligned Image

  • <figure class="figure align-right">
    <img src="https://cdn.loc.gov/service/pnp/pga/03800/03898v.jpg" alt="Emancipation, by Th. Nast ; King & Baird, printers" />
    </figure>
Image description

Lorem ipsum dolor. Sit amet donec justo feugiat nisl inceptos ipsum feugiat. Amet nulla ultricies. Aliquam ac vestibulum. Pellentesque facilisis est. Eget ac ut. In quis id. Nascetur odio diam turpis quam volutpat. Tristique ante sit faucibus proin maecenas at earum vitae. In tellus et et at purus posuere nec fringilla nulla leo ipsum maecenas mauris fusce. Mollis at facilisis. Integer dolor pharetra. Dui dictum metus placerat sodales sed cras vehicula et consequat accumsan ornare hac velit pellentesque donec in tristique wisi faucibus mi. Vel quis quasi molestie in ullam nec accumsan suspendisse aliquet ipsum sed doloribus suscipit porttitor sed in vestibulum. Facilisi suscipit odio. Pellentesque ut pede. Natoque elit tincidunt. Felis nulla magnis. Natus in mi. Condimentum ultrices amet.

Corrupti lorem curabitur dignissim in in. Quam vulputate massa eu amet a. Ligula dolor corporis. Dapibus nulla elit donec vel et lectus elementum erat. Nulla eu suspendisse. Sit vitae dolor eros deleniti ut. Faucibus viverra porta dolor in tincidunt. Turpis felis eros. Massa magnis sem wisi in malesuada. Erat aliquam vivamus maecenas praesent mattis cursus aliquet augue. Quam con consequat. Vestibulum cursus nulla mi amet cras. Vitae in vestibulum blandit sit arcu. Quis nonummy nisl amet in magna ligula sollicitudin tempor. Nunc in sit. Erat nisl dolor sociosqu porttitor fermentum enim lobortis tortor pharetra suscipit nibh nisl amet eget est nam pellentesque. Ipsum dolor tortor. Sollicitudin consectetuer dolor. Elementum ut integer tellus convallis lorem. Eu potenti dapibus erat massa sit.

Full-Width Image

  • <figure class="figure align-stretch">
    <img src="https://cdn.loc.gov/service/pnp/pga/03800/03898v.jpg" alt="Emancipation, by Th. Nast ; King & Baird, printers" />
    </figure>

Mollis at facilisis. Integer dolor pharetra. Dui dictum metus placerat sodales sed cras vehicula et consequat accumsan ornare hac velit pellentesque donec in tristique wisi faucibus mi. Vel quis quasi molestie in ullam nec accumsan suspendisse aliquet ipsum sed doloribus suscipit porttitor sed in vestibulum. Facilisi suscipit odio. Pellentesque ut pede. Natoque elit tincidunt. Felis nulla magnis. Natus in mi. Condimentum ultrices amet.

Image description

Mollis at facilisis. Integer dolor pharetra. Dui dictum metus placerat sodales sed cras vehicula et consequat accumsan ornare hac velit pellentesque donec in tristique wisi faucibus mi. Vel quis quasi molestie in ullam nec accumsan suspendisse aliquet ipsum sed doloribus suscipit porttitor sed in vestibulum. Facilisi suscipit odio. Pellentesque ut pede. Natoque elit tincidunt. Felis nulla magnis. Natus in mi. Condimentum ultrices amet.

Special Coding: Rights-Restricted Images

Many images is the Library's digital collections cannot be viewed in their full size from an offsite computer (only a very small thumbnail may be viewed offsite). These images can be easily identified because they display the message: Full online access to this resource is only available at the Library of Congress.

When including a rights-restricted image, you will need to resize the image using graphics editing software, and then add the appropriate new width to the <figure> tag. The steps for using a rights-restricted image are:

  • Use graphics editing software (like Photoshop) to resize (and crop, if necessary) the image. Ensure that the longest side of the image does not exceed 300 pixels in length. When you save your image, please make note of the exact width of the image.
  • Store the image in your program's web space on the RS7 (contact your your webmaster to upload the image to server—you will link to it there).
  • Add special coding to assure the proper sizing of the image and caption in your guide.

In the example below, the width of the image is "300px".  However, if the image is taller that it is wide, the width will be a number less than 300px. You can obtain the width of the image from your graphics software:

<figure class="figure align-right" style="width:300px;">
<a href="https://www.loc.gov/item/2015650658/" target="_blank"><img alt="Image showing the Hoboken Four" loading="lazy" src="http://www.loc.gov/rr/record/images/hoboken-four-300.jpg" /></a>
</figure>