wordpress: photo galleries

Using the WordPress Media Library

WordPress has a built-in media section where it stores everything you upload. It works well if you are using photos with the occasional blog post. In this section we'll learn how the Media Library works and how to add and manage your media.

How to upload photos

To upload photos directly into your WordPress Media Library, go to your dashboard and select Add New as shown below.

add media

 

Next, select the photos you want to use.

 

select your photos

WordPress will upload all your photos and automatically generate thumbnail images. When it's finished, it will let you know everything uploaded successfully, as you can see here.

upload complete

How to edit photo metadata

While it's best to edit metadata in the actual images, if you don't it can still be done in WordPress. Notice that one of the files uploaded with the name "Doc title" This is the information that was entered into the title field in Photoshop. If you didn't edit the Title field in Photoshop, you will have to do it here to have a title that is pleasing to read.

Click to Show (the Doc title detail button) to take a closer look.

image detail

WordPress automatically pulled in the Title and Description fields but the caption is blank. WordPress galleries use the description field so this will do for now. Also, make sure to fill in the Alternate text. This describes the contents of the photo for blind users and will help Google better index your site. When you're done editing your photos, click Save all changes.  

Your photos in the Media Library

Saving will take you to the Media Library. The Media Library seems fine at first glance. Notice that when you hover your mouse over a thumbnail you have the option to edit or delete a photo. But if you use a lot of photos, this interface could become unmanageable very quickly. We'll talk about solutions for that later.

media library

For now take a look at the Attached to column. WordPress expects photos to be attached to posts or pages. Since we haven't done that yet, all the photos are Unattached. Simply click the Attach button and select a post or page to change the status.

Why do we care? Native WordPress galleries use this to information to identify which pictures to show on a given post or page. Generally, it's better to upload directly from a post or page. Let's look at how that works.