Managing Media Files in WordPress

 

This article is excerpted from WordPress 24-Hour Trainer by George Plumley. (ISBN: 978-0-470-55458-6, Copyright 2010 Wiley Publishing Inc.)

In this lesson I show you how to work with the library, both sorting and finding media files, as well as editing and deleting them. I also show you some administrative settings for media files. This web article version of the lesson includes both the text of the book lesson and the video from the book’s DVD.

 

Finding Files in the Media Library

The Media Library screen accessed from the Media Library link of the admin menu, shown in Figure 19-1, is very similar.


Figure 19-1

One important difference with this screen is that you can see whether a media file is attached to a post, and if so, the name of the post with a direct link. To be attached to a post means that the file is listed in that post’s gallery.

 

Why is it useful to know if a media file is attached? If it’s not, you know it’s available to be used in a gallery, because media files can be attached to only one post.

·        Delete the file, which removes it from the first post’s gallery, then upload the file into the new post (you cannot simply change the post to which a media file is attached).

·        Upload a second copy of the file (WordPress automatically renames it by adding a number so there’s no conflict with the existing copy) into the new post where you want it to appear.

Of course, if you don’t need a file to be part of a post’s gallery—you only want to insert it into the body of the post—you’re free to insert media files in as many posts as you’d like, whether or not the file is attached.

If you’re looking for unattached files, an easy way of finding them is to use the menu at the top of the page just below Media Library. The links in this menu will vary depending on the types of files in your library. There will always be an All link, but there can also be: Images, Video, Audio, and Unattached (with the total for each in brackets, except Unattached ). Clicking Unattached displays all media files that are not in a post gallery.

This little menu is important because it tells you what you’re looking at in the library. If you don’t notice that the Images link is selected, for example, you’re left wondering why your PDFs, videos, and audios aren’t listed. Just click All to display every type of media file. The currently selected choice will always be in bold black.

You can also find items in the Media Library by the date they were uploaded into WordPress. The Show All Dates menu at the top of the page drops down a list of available months.

The Media Library displays files in descending chronological order (newest first) and there is no option for changing this. However, you do have some display choices in the Screen Options tab (at the top right of the screen), such as which columns to show and how many files to display per page.

The last method for finding media files is the Search field at the top right. Keep in mind that it looks for words and phrases only in the Title and Description fields of media files, and that the search is conducted on all media files, regardless of which ones are currently displayed.

 

Editing and Deleting Media Files

 

To edit a file in the Media Library, just click its name. Or, when you mouseover the row for that media file, a text menu appears allowing you to Edit, Delete, or View the file.

Clicking the name or the Edit link takes you to a new page, shown in Figure 19-2, where you see the file and the options to edit.

 

 

 

 

Figure 19-2

There are very few options because they relate only to the file itself. Even with files that are attached to posts, you cannot edit parameters like alignment or size from this screen because you’re not editing the post, just the media file. If you do need to change those other options, WordPress makes it easy by having the link to the post right there in the Media Library.


Note: If a media file is attached to a post, changes made in the Media Library are reflected in the file’s listing in the gallery. However, inserted copies of the file will not be affected—their titles, captions, and so on are independent on a per-post basis.

 

If you need to delete a media file using the Media Library, simply mouseover the title of the file and click Delete from the menu that appears. If you need to delete large numbers of files, check the box on the left of the relevant files, choose Delete from the Bulk Actions drop-down at the top or bottom of the screen, and click Apply. 

Warning: If you delete a media file that’s been inserted into a post(s), the link(s) will remain in place and show on the website as broken. You need to go into each post and get rid of the code that’s trying to find the deleted file. All that means is finding the empty box in the Visual Text Editor and clicking it; you’ll get the familiar red X for deleting.

In the case of files in a post’s image gallery there’s no issue with deleting from the Media Library—the file just disappears from the image gallery.

 

 Admin Settings for Media

You can change some site-wide parameters under the Settings Ø Media link on the admin menu. The screen for that page is shown in Figure 19-3.

Figure 19-3

Currently, the settings only relate to image size. These are the dimensions that WordPress uses when it creates up to three different versions of images you’re uploading: Thumbnail, Medium, and Large. These are created only if the longest side of the uploaded file is larger than the maximum dimensions for that version.

 

For example, if the maximum width or height for Medium is 300 pixels (the default WordPress setting) and the image being uploaded is 400 pixels wide by 270 pixels high, a Medium version will be created with dimensions of 300 pixels by 203 pixels. WordPress keeps the proportions of the original and makes the longest side whatever you’ve set as the maximum width or height. Had the image been 270 pixels wide by 400 pixels high, then the Medium version created would have been 203 pixels by 300 pixels

 

The one exception to this is the Thumbnail setting. By default, WordPress checks the box that says “Crop thumbnail to exact dimensions.” This means the Thumbnail version will be exactly what’s in the two fields for height and width (150 pixels by default). If you want Thumbnails to be proportional, you’ll need to uncheck that box.

You can also change settings for how media files are stored on your server, by going to Settings Miscellaneous. However, it’s rare you’d ever want to change the default settings.

 

This article is excerpted from WordPress 24-Hour Trainer by George Plumley. (ISBN: 978-0-470-55458-6, Copyright 2010 Wiley Publishing Inc.)

 

 

 

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *