Hi, how are you? I hope you are doing well. So today we are going to know about working with media in WordPress.
WordPress features a robust system for managing all of your web site’s media. Media refers to the images, video, audio recordings, and files uploaded to your web site using WordPress. Media that is uploaded in WordPress can easily be inserted into any post or page for display. Media can be uploaded and attached at a post/page level or directly to the Media Library.
The WordPress Media Library is where you can add, manage, and delete all media across your entire WordPress web site. The Media Library SubPanel enables you to manage all media on your web site, whether uploaded directly in the Media Library or uploaded directly to a post or page.
You can upload media to your WordPress web site by clicking the Add New link under the Media SubPanel on your Admin Menu. Click the Select Files button to upload media using the Flash uploader. If you experience issues with the Flash uploader (it doesn’t work on every host) you can click the link for the Browser Uploader.
One major feature of the Flash Uploader that is often overlooked is the ability to upload multiple files at a time. Simply select a group of files in the dialog box that appears and click Open. All files selected are listed showing an upload status bar while the images are uploaded to your web site. The browser uploader can upload only a single file at a time.
If you experience problems uploading media, the first thing to check is the permissions set on your uploads folder. By default WordPress folders should be set to 755 for security reasons, but some hosts require the uploads folder to be set to 777. These numbers represent the chmod access level assigned to each directory and file on your web server. If you are running WordPress on a Windows server you should give the IUSER account write permissions to the uploads folder. This allows WordPress to upload any media files directly to your web site.
WordPress does not filter by the file type; therefore all the file types are technically supported for uploading. This can also create a security vulnerability and should be locked down if you allow your members to upload media files. Plugins are available that can restrict the media upload to specific file types, such as only images.
Media is inserted on the Post/Page Edit screen. From here you can select any media that has been uploaded across your web site and insert it directly into your post or page. You can also upload any new media that you would like for use in your post or page.
To insert media, start by clicking one of the four icons located next to the Upload/Insert text link below the post tile. The icons represent image, video, sound, and media. Clicking any one of these icons brings up the Thickbox overlay to upload and insert media into your post or page. From here you will notice multiple tabs across the top of the Thickbox, but the two we are focused on are the Gallery and Media Library tabs. The Gallery tab, which only shows up after you upload an image to your post, houses all images uploaded to that particular post. The Media Library tab houses all images uploaded across your entire WordPress web site. Clicking either tab displays images in a list format.
To insert an image into your post, click the Show link located to the right of the image you want to embed. This expands the box and shows you all of the properties associated with that image. Here you can set the correct alignment and size then click the Insert into Post button. Upon clicking this button the Thickbox overlay disappears and the image is embedded into the post content box. If you are using the visual editor you should see your image displayed.
WordPress also has a built in Gallery feature. This feature allows you to upload multiple images to a single post or page and display all of those images in a nicely formatted gallery. to use the gallery, start by uploading multiple images to a post. After you have a couple images uploaded, close the Thickbox overlay by clicking anywhere outside of the popup, or just click the X in the upper right hand corner. Next we’ll use a shortcode in our post content to represent the gallery. A shortcode is a specific piece of code, usually wrapped in brackets, that is recognized by WordPress or a plugin. When editing a post or page you will see the actual shortcode, but when viewing the post or page on your web site the shortcode shortcode will be replaced by the functionality attached to that shortcode, in this case an image gallery. Drop this shortcode in your post content:
and save your post. An image gallery will now be displayed in your post! The gallery shortcode also supports different options that you can use. To specify the number of columns in your gallery (the default is 3) use this option:
You can display a gallery from a different post by specifying the post id:
WordPress does not have a built-in video or audio player, therefore any video or audio uploaded to WordPress cannot be automatically embedded in your post or page. To embed video or sound you will need a plugin that supports the proper video format you would like to embed. Many video player plugins are available at the official WordPress.org plugin directory.
You manage media under the Media -> Library SubPanel. Here you can manage all media uploaded to your WordPress web site. Only media uploaded using WordPress will show up here, so if you used FTP to upload images to your web site they will not be displayed.
You can filter what media is displayed using the filter links located at the top of the page. You can also search your media using the provided search box at the top right.
One interesting feature of the Media Library is the Attached To column. You can upload media in one of two ways: either directly to the Media Library or directly to a post or page. If the media was uploaded directly to a post or page, this field displays the title and date of the post or page it is attached to. Clicking the post title link brings you directly to edit that particular post. If the media was uploaded using the Media Library, this field is blank.
To view all media files uploaded directly from the Media Library, click the Unattached filter. This filter displays all images that were not uploaded directly to a post/page. Also, when you are viewing Unattached images a new button appears just below called Scan for Lost Attachments. Clicking this button checks WordPress attachment records in the database for any detached images. This feature does not actually scan the directories and pull in any images found. When you hover over any unattached images found an option appears to “attach” that image. A Thickbox overlay pops up allowing you to search for specific post or page to attach the image to.
The Media Library does not feature a bulk edit feature, but you can bulk delete media. Just select the checkbox next to each piece of media that you want to delete, or select the top checkbox to auto select them all, and select Delete from the Bulk Actions drop-down.
To edit any image you’ve uploaded in WordPress hover over the image and click the Edit link. Next click the “Edit image” button that appears next to the image thumbnail. This launches the new Edit Media section as shown in the figure.
Across the top of the Edit Media section are image editing buttons that perform specific editing tasks. The first button is the crop icon, which by default is not clickable. To crop the image, click anywhere on the image and drag the selection box to the desired cropping position. When the selection box exists on the image, the crop button will become active, allowing you to click it to crop the image based on your selection. Also notice the Image Crop section located in the right Edit Media sidebar menu. The selection sizing will automatically fill out as you drag the selection box around prior to cropping. This can help you specify the exact cropping dimensions needed for your image.
The next two buttons are to rotate the image clockwise or counter-clockwise. You can also flip the image horizontally or vertically. The Edit Media toolbar also features undo and redo functionality. This is handy if you make a series of edits but decide you don’t like the finished product; you can simply undo the last few edits to revert back to the original. Remember changes are not saved until you click the Save button located just below your image.
You can easily scale the image by clicking the “Scale Image” link in the right Edit Media sidebar menu. Here you can enter new dimensions for your image. As you type in a new width or height, WordPress will dynamically fill in the appropriate dimension to maintain the aspect ratio. The thumbnail settings section lets you select what images the edit changes will apply to. You can apply your changes to all image sizes, just the image thumbnail, or all sizes except the image thumbnail.
Tell me what you think about the post because you are cool and want to help the community grow then COMMENT below, SHARE and be a sharer and let your friends know about new awesome information and SUBSCRIBE if you love yourself because investing in your knowledge is the best thing you can do for yourself and IT’S FREE.
See you in the next post.
Hi, I’m Aakanksha, a computer science engineer and the founder of TheTechPower. I help people make there online presence process easier by empowering them with clean, beautiful and easy to use wordpress themes.