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.
- From within your WordPress Dashboard, go to Media, then Add New.
- Click the Select Files button.
- Locate the image on your computer, and double click it.
- Once the image is finished uploading, click on the Edit link.
- 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:
- From within your WordPress Dashboard, go to Media, then Library.
- Locate the image you want the URL for. You can perform a search if need be.
- Click on the Title of the image, or on the Edit link for the image.
- 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.
- From within your WordPress Dashboard, go to Plugins, then Add New.
- Do a search for: Display All Image Sizes.
- Click Install, then Activate.
- Now, head back to the Media Library by going to Media, then Library.
- Select an image.
- Scroll down below the image details to the Sizes section.
- From here, select a size from the dropdown box.
- Copy the Image URL to the clipboard.
This is by far the most beginner guide on how to get WordPress uploaded image URL.