posted from http://feedproxy.google.com/~r/tipsandtricks-hq/~3/6-27EvzPl58/how-to-get-the-image-url-from-the-wordpress-media-library-9347

Many tools, widgets, themes, and plugins for WordPress often ask for an image URL during the configuration steps. Follow along to see how to get the Image URL so you can use it in the configuration.

In this tutorial, you will learn:

  • How to upload an image to the WordPress Media Library.
  • How to get the image URL for the uploaded image.
  • How to get the image URL for any image that was previously uploaded.
  • How to get the image URLs for the thumbnail versions of the uploaded image.

Resources discussed in the video:

First, let’s upload an image to the WordPress Media Library, and get the image URL for the Full Size image.

  1. From within your WordPress Dashboard, go to Media, then Add New.
  2. Click the Select Files button.
  3. Locate the image on your computer, and double click it.
  4. Once the image is finished uploading, click on the Edit link.
  5. The Image URL is in the File URL box on the right side of the screen. Highlight it and copy it to the clipboard. An easy way to highlight it is to triple-click it.

In a similar way as described in the previous steps, you can get the URL for an image that was previously uploaded. There are a couple slight differences though, so let’s cover those steps now.

To get the Image URL for an image already in the Media Library:

  1. From within your WordPress Dashboard, go to Media, then Library.
  2. Locate the image you want the URL for. You can perform a search if need be.
  3. Click on the Title of the image, or on the Edit link for the image.
  4. Copy the File URL to the clipboard.

In the previous steps, you were getting the URL for the Full Sized image. WordPress, your theme, and sometimes an activated plugin, will create other images with different dimensions (or widths and heights).

Sometimes the tool you are placing the Image URL in will automatically utilize the appropriate image in an intelligent way, by responding to the screen size and orientation it is being viewed in.

Other times however, you may want to explicitly get the URL of a very specific thumbnail version of the image, rather than use the Full Size.

There is a plugin in the WordPress Plugin Repository, called “Display All Image Sizes” that exposes the URLs for all versions of your uploaded images.

Let’s go through the steps to install this plugin, and find the varying Image URLs.

  1. From within your WordPress Dashboard, go to Plugins, then Add New.
  2. Do a search for: Display All Image Sizes.
  3. Click Install, then Activate.
  4. Now, head back to the Media Library by going to Media, then Library.
  5. Select an image.
  6. Scroll down below the image details to the Sizes section.
  7. From here, select a size from the dropdown box.
  8. Copy the Image URL to the clipboard.

comments