Exercise 6.1 - Uploading and using media
Last updated
Last updated
In this exercise you will upload an image directly to the media library (Part 1) and then use that image when creating content (Part 2).
Navigate to the Media page by clicking on Content then Media on the Admin menu.
Click the Add Media button at the top left of the page.
Click Image to upload an image file.
Upload an image file:
Give it a short, descriptive name.
Choose a file from your computer, using the Browse button.
Click Open to upload the file.
Add Alt text.
Note Image alt text is required to enable screen readers and facilitate vision-impaired people.
Click Save
Create a new Page following the instructions in Exercise 3.1
Click on Banner and then expand "Banner featured image". There you will see an Add media button. Note - you may not have a "Banner" tab if you are not using CivicTheme. In that case, find any Media upload field and use that.
Select the image and then click on Insert selected.
Once the image is selected you will see a preview in your content like the this screenshot:
Fill out any required fields for your Page and click the Save. The image now appears on the frontend. The location of the image may be different on your site depending on your theme.
Navigate to Content → Files from the Admin menu and locate the image file you uploaded. It should be at the top of the list as it is the most recently added file. Note the name of the file.
Next, click on the Media tab button and locate the Media entity that that points to the file you uploaded.
Discuss with the trainer, why the Name of the file (from the Files tab) is different to the Media name (from the Media tab).
Tip: The Media entity allows you to enter a more user-friendly Name (and other metadata) rather than using the name of the file.