How to add and edit media files using the media library in WordPress
If you want to add any type of media file in WordPress you can do that from the media library. For general information on the media library check out the tutorial on managing the media library in WordPress. In this article we'll briefly outline how to add and edit media files and the settings on the add/edit forms.
For screenshots and some more detailed information on the topics discussed in this article check out the tutorial on adding and editing media files in WordPress.
In your admin panel go to Media menu>Library sub-menu. To add a new file click on one of the two Add New buttons (there's one in the top left corner and another in the menu on the left). To edit an uploaded file click on its name in the table or on the Edit button under the name.
After you click on the Add New button you'll be redirected to a page from which you can upload one or more files. By default, this is done with the multi-file uploader. Just click on the Select Files button that's on the page and from the window that pops out choose the file(s) you want to upload. After the file(s) is uploaded it will be listed on the same page. Next to it there should be an Edit button with which, if you want to, you can go directly to the edit form and configure its settings. On the page with the multi-file uploader there's a link labeled browser uploader. If you want to, you can use that uploader to add images instead of the multi-file one. Click on the link, on the following page click on the Browse button, select the file from the pop-out window and click on the Upload button. With the browser uploader you can upload one file at a time.
On the edit form you can configure different settings related to the file, but once a file is added you're not required to edit any settings in order for it to be shown and used on the frontend. The settings that are present on the edit form depend on the type of media file. Images have some more settings as compared to other files (e.g. audio, video, text files). At the top of the edit form is the name of the media file. WordPress automatically uses the file name as the name but excludes the file extension. That's the name that's shown on the frontend. You can change it to anything you want. Under it you'll see the permalink of the file attachment page. If the file is an image, under the name of the file and the permalink the image itself will be displayed.
Next to them on the right side is the Save block. It shows the date on which the file was uploaded, the URL of the file, the full file name with the extension (e.g. hostknox.jpg), the file type, and if it's an image, the original dimensions. It also contains the Update button for saving any changes to the settings and a Delete Permanently button with which you can delete the file.
Under these you can find three text areas labeled Caption, Alternative Text, Description (the one for the alternative text is present only when editing images). If the file is an image and you type a caption, it will be shown on the frontend under the image. The alternative text is displayed when for some reason the image can't be loaded. The description is shown only on the file attachment page (not in posts or on static pages).
There are some blocks with settings that are hidden by default. To include them on the edit page click on the Screen Options button in the upper right corner and mark the checkboxes of the blocks you want to include. From the Discussion block you can enable/disable comments and pingbacks on the file attachment page. The Comments block lists all the comments submitted from the file attachment page (not those submitted from posts or static pages to which the file is attached). From the Slug block you can change the slug of the file attachment page. The slug is the part of the URL of the file attachment page that corresponds to the name of the file (e.g. hostknox in yourdomain.com/post-name/hostknox). Slugs are only used with pretty permalinks. From the Author block you can change the author credited with uploading the file.
If the file that you're editing is an image, you'll see an Edit Image button under the image. Clicking on it will display some additional options. With them you can crop and scale the image, you can also rotate it clockwise and counter-clockwise, and you can flip it horizontally and vertically.
For screenshots and more details read the tutorial on how to add and edit media files using the media library in WordPress.
Was this answer helpful?
- How to add and create custom menus in WordPress
- How to enable and use the automatic database optimization and repair tool in WordPress
- How to copy WordPress to another hosting account
- How to change the font family, size and color of comments in WordPress
- How to configure and manage the network settings in WordPress multisite