Adding an Image to a Basic Page (Drupal 9)

Article Contents:

  1. Getting Started
  2. Adding an Image
  3. Resizing an Image
  4. Moving an Image
  5. Removing an Image
  6. Adding a Link to an Image
  7. Responsive Images

Getting Started

Log in and navigate to the page where you wish to add an image if you are not already there. If you need help logging in, see the Logging In and Out article.

Click to edit the page.

Uploaded Image (Thumbnail)

Adding the Image

Scroll to the Body field WYSYWIG. Within the editor, click the area where you want your image to go. For example: If I want to add my image after the first paragraph, I would click within the body here:

Uploaded Image (Thumbnail)

Once you have selected the area for your image, click on the photo button in the toolbar of the WYSYWYG editor.

Uploaded Image (Thumbnail)

This is the window that will pop up:

Uploaded Image (Thumbnail)


Here, you can either upload your image or select one that is already in the site

To upload a new image, click Select file and then browse the image you want in your local files

If you want to search for an existing image, you can enter the image's name in the search bar under Name and start searching. There are other various filters that you might find helpful as well.

Uploaded Image (Thumbnail)

The you have to select your image. It will look as checked

Uploaded Image (Thumbnail)And finally, click Insert selected

Resizing the Image

For resizing an image you click Edit media, from the image you've just inserted

Uploaded Image (Thumbnail)

In the next window, you there is a dropdown menu under Display. You click it

Uploaded Image (Thumbnail)

There are multiple ratios you can select for the current image

Moving the Image

There is also a box with a crosshair in the top left corner of the picture:

Uploaded Image (Thumbnail)

Clicking and dragging this box will allow you to move the image if you want to place it in a different area.

Removing an Image

To remove an from the body you can simply click the image from within the editor and hit the BACKSPACE key.

Adding a link to an Image

If you want people to be able to click your image and have that take them to another page, first add the image as explained above. Then, while still in the editor, click on the image to select it and then click the link button in the toolbar:

Uploaded Image (Thumbnail)

You will see a pop-up window asking for a URL:

Uploaded Image (Thumbnail)

Add the link as either an absolute link for an external website or a relative link for a page within your department website. For more information on linking, see the Linking article.

Responsive Images

The images in the D9 environment are Responsive. This means that their size will change to match the size of the display they are on. The image will not expand larger than what you have defined through the editor, or larger than the original image size.

For example: here I have added an image of the campus into the editor.

Uploaded Image (Thumbnail)

t appears very large here. If I view the page however, it shrinks to match the width of the body and my monitor display:

Uploaded Image (Thumbnail)

And if I shrink my browser window as if viewing on a mobile device or other smaller display, the image will continue to shrink to match the size:

Uploaded Image (Thumbnail)

Details

Article ID: 89481
Created
Fri 5/21/21 11:30 AM
Modified
Wed 8/2/23 8:57 AM