Adding an image to a blog sidebar. Sounds easy enough, right? However, as much as I love WordPress, they don’t exactly make this process super intuitive. How come? On core WordPress, unlike in other platforms, there’s no Image Widget. This leaves brand new bloggers wondering, how do I add an image to my WordPress sidebar? Fear not, the process is actually really crazy easy once you have it down.
The Core / Manual Way
The clearnest way to add an image is the way WordPress core wants you to do it – by using the Text widget and a line of (super easy, everyone should know it) code –
The part that tends to stumps people is “Do I need to upload my image somewhere else like Photobucket? Where do I get this URL?” No you don’t need to add the image anywhere else but WordPress and you get the URL as follows –
First, go to Media -> Add New. There upload your image. Once it’s done uploading, click on “Edit” on the right side of the image thumbnail.
On the Edit Media page you’ll see a sidebar on the right, find the field “File URL“. This is your image URL. Select it and copy it.
Now open a new tab and go to your WordPress dashboard’s Widgets page (Appearance -> Widgets). Drag a Text Widget where you’d like to place the image. Then add the line of code I wrote out above.
If you’d like to add an alt tag, the code would look as follows –
<img src="http://imageurl.com" alt="Alt Tag Here YAY SEO juice!"/>
If you’d like to have the image link somewhere, the code would look as follows –
<a href="http://linkforimage.com"><img src="http://imageurl.com"/></a>
The Plugin Way
Now, I completely understand now wanting to deal with any code at all so thankfully there is a plugin option for you. First, install and activate the Image Widget plugin.
Once you’ve activated the plugin, go to Appearance -> Widgets. There you will now see a new widget labeled “Image Widget”. Simply drag and drop this widget to your WordPress sidebar where you’d like to display an image.
The advantage of using this widget is the lack of code / HTML you’ll use in order to add an image. All you have to do is click “Select An Image” to upload an image right from the widget using the WordPress image uploader. Once you have uploaded an imaged, the image widget will show you a preview of your image and provide you with a host of settings such as alt text, caption, size, etc.
Once you’re all done setting the widget as you’d like it, click Save. And that’s all you have to do!
Hope this quick tutorial helped you add an image in WordPress sidebar! If you need more help with WordPress topics, be sure to check out my WordPress 101 archives!