Blog

Find the File URL in WordPress

Great advantages come from taking the occasional risk. Putting yourself out on a limb, taking a little more control. Even a little risk, like trying your hand at inserting an image with straight HTML, might just reward you with something greater in the long run. For instance, more control over your website.

Well here’s how to start off that journey by finding the file path to media in WordPress.

The first step  is to upload your image to the media library. Once your image is loaded, you can hover over the thumbnail to find the Edit, Delete, and View options.

You’re going to click Edit.

Got-to-Media-Library

Now, you’ll see the “Edit Media” page. Circled in red below, you can see the File URL. Copy that – make sure you get the whole thing.

Choose-the-File-URL

Now that you have the filepath for your media, you can use it in code. The basic
This will get your image on the page:

<img src="https://www.domain.com/filepath">

Here, you can specify image dimensions (height and width), and the text that would appear if someone hovered their mouse over the image, or the image were to fail to load (alt). The Alt tag is important for accessibility, too. It’s what screen-read programs use to tell the visually impaired what’s pictured on your website.

<img src="https://www.domain.com/filepath" alt="Alternate Text" height="42" width="42" />

What’s Next

Our Work

Check out some recent work we’re proud of.

Our Blog

Read our latest ideas about tech, features, messaging, and more.

Get in Touch

Want to discuss a project? Hit us up, we’d love to chat!