• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Nile Flores Media

Helping You Rock Out Your Website Like A Rockstar

  • Home
  • About
  • Blog
  • Portfolio
  • Hire Me
  • Resources
  • Contact
  • Blogging
  • WordPress
  • Social Media
  • SEO
  • Web Design
  • News
  • Podcast
You are here: Home » WordPress » How to Add Images to Widgets in WordPress

How to Add Images to Widgets in WordPress

By Nile Flores 19 Comments


wordpress-tricksThe great thing about WordPress is that you can do a lot of things, including the fact that you can add images in most places.

However, after encountering a few clients who were still learning how to use WordPress the question on how to add images to widgets keep popping up. So, I am going to show you a couple methods. One of these may be easier that the other.

The first method is using WordPress to you advantage. The second method is a crash course in basic HTML.

Add Images to Widgets in WordPress – Using The Add Media

1. Create a new post or page.

2. Click the Add Media button.

add-image-wp

3. Upload the image you want to use, or if you have already uploaded the image, select it.

add-image-wp-2

4. Label your image.

add-image-wp-3

5. Click the button to insert the image into the new post or page.

add-image-wp-4

6. Copy the code inserted into your post. (You will want to have the post editor in the HTML mode tab.) The code will look similar to the following:

<img src="YOURIMAGE" alt="IMAGENAME" width="200" height="200" class="alignnone size-full wp-image-5" />

You might want to edit that code down to:

<img src="YOURIMAGE" alt="IMAGENAME" />

7. Go to Appearance> Widgets

8. Drag a Text Widget to the widget area you want your image to go.

9. Paste your HTML into the widget.

<img src=”https://nileflores.com/wp-content/uploads/2013/09/add-image-wp-5-252×300.jpg” alt=”add-image-wp-5″ width=”252″ height=”300″ class=”aligncenter size-medium wp-image-7280″ />

10. Click the button to save your widget.

Add Images to Widgets in WordPress – Using HTML

In HTML, the basic markup for an image is:

<img src="LINKTOYOURIMAGE" alt="NAMEOFIMAGE" />

You will replace LINKTOYOURIMAGE with the URL to the image that you want to use. This could either be from an external source or from your own WordPress Media Library. You will need to get the image’s link by going to your Media Library and clicking Edit on the image. You will then copy the File URL that is in the box to the right of the image.

edit-image-wp-screenshot

You will also need to change NAMEOFIMAGE to the name of your image. This is there as a means to label your image. It is consider part of valid markup and beneficial for search engine optimization.

The following HTML includes linking to another website or URL:

<a href="LINKTOWEBSITE"><img src="LINKTOYOURIMAGE" alt="NAMEOFIMAGE" /></a>

The following HTML includes linking to another website or URL and making that link open in a new window.

<a href="LINKTOWEBSITE" target="_blank"><img src="LINKTOYOURIMAGE" alt="NAMEOFIMAGE" /></a>

With any of the code, you just go to Appearances > Widgets in your WordPress backend. Then you drag over a text widget and past your code. If you need to position the image better, you might have to add some styling.

For example:

<img src="LINKTOYOURIMAGE" alt="NAMEOFIMAGE" style="width: 200px; margin: 0px 5px 0px 0px;" />

Personally, I like the second, rather than using the first method.

How do you add images to widgets in WordPress?


Filed Under: WordPress Tagged With: add images, images, widgets, wordpress tricks, wordpress tutorials

About Nile Flores

Nile is a 43-year old female from the greater St. Louis (Southern Illinois side) area. Nile is a mother of 1 son. She is also a web designer and developer, a graphic designer, and a public speaker, who exclusively designs and develops using WordPress. She also blogs at GoDaddy's Blog, Verpex Hosting's blog and her very personal sites, Pixelled and Nail Polish Happy.




Related posts:

No related posts.

Reader Interactions

Comments

  1. marquita herald says

    September 4, 2013 at 10:08 pm

    I used to use the 2nd method you outlined above, then I found the “Image” widget and now I just use that. Just drag the widget to the sidebar, open click on select image and pick out whatever you want to add from the media files – there’s an option to add a link, which I almost always do – and that’s it. I love easy. 🙂

    Reply
  2. vishvast says

    September 5, 2013 at 4:16 am

    i tried it so many times but i always fail to add code but this time i am completely done with this thnx for the code and nice tutorial

    Reply
  3. Bilal Malik says

    September 7, 2013 at 3:07 pm

    Hey Nile ..

    Thanks for it! I want to know one thing is more that if i want to add any page link my pic in widget that what should I do ? I tried a lot to put link on wedget’s image! If it is possible to do then inform me. I would like to do it.

    Reply
  4. Jupiter Jim says

    September 7, 2013 at 3:14 pm

    Nile,
    I long time ago I did a video tutorial on how to add an image to a text widget. Your instructions are very clear and helpful. However, these days I just install the Black Studio Widget plugin and then click on the “add media” button (or whatever it is) using the visual editor in the Black Studio Widget.

    I thinks it’s really important that people know how to use the methods you taught here to help them master the basics!

    Thanks again for more great stuff!

    Love Your Blog and Hope You win the Small Business Influencer Award! I have voted for you more than once!

    ~ Jupiter Jim

    Reply
  5. Lalith says

    September 8, 2013 at 1:36 pm

    Hii Nile
    This post really helps as I was searching for this post from 2 days
    A special Thanks for sharing this post

    Reply
  6. kamran says

    September 9, 2013 at 10:32 am

    Nice tutorial, I found it useful because Tomorrow I am going to use the method. Thanks

    Reply
  7. Hamza Sheikh says

    September 10, 2013 at 12:27 am

    Quick tutorial for the quick purpose. I have been using this trick from last several years, and it allowed me embedding lot of stuff in my WordPress website. The TEXT format widget is just a blessing.

    Reply
  8. jawad zaib says

    September 10, 2013 at 5:25 am

    Nice tutorial Nile i never tried this in my short blogging career but now i am going to give it a shot. your article is very clear and step by step good job thanks for sharing it with us…

    Reply
  9. Gautam Biswas says

    September 18, 2013 at 4:19 pm

    Hello Nile,

    Your blog’s design is really nice. I have visited your blog many times and learnt lots of things. But now i am placing a comment here. I faced problem adding images in my blogspot blog side bar with anchor text and return to your blog and found this helpful for me.

    So many thanks Neil for your great post.

    Regards,
    Gautam

    Reply
  10. Silviu says

    September 19, 2013 at 3:38 am

    Hi Nile,

    Thank you for the information. For me it is very useful, especially when you want to add an image to an opt in form (usually above the opt in form). I use the second method but now I think the first one is simpler.

    Everything you wrote was carefully copied and placed in my swype file for later use. I will surely forgot it in a week but now I know I have a clear guide for adding images to widgets and whenever I need, I can go to that file and learn how to do it again.

    Now, there is another thing that interests me very much. Maybe your clients talked to you about that. When I insert a video in my blog, I use Youtube. I upload the video to youtube and then insert the code into my post and it works. You can do the same with other video sites.

    The problem is that you are dependent to an external source. This is what I want to avoid.
    Is there any method of uploading a video to my blog, directly, without the help of a third party ?
    I think it must be a html code for this, too.

    Thank you for this excellent post. Very useful.

    Have a wonderful day

    Reply
  11. Matt says

    September 24, 2013 at 3:28 am

    Nice tutorial. It helps me design my site easily. Thanks for this tip Nile.

    Reply
  12. Yorinda says

    September 25, 2013 at 5:03 pm

    Hi Nile,
    an easy to follow tutorial.
    It is always good to have a few options to do things, so we can use the one that works best for us.
    What are you thoughts on this plugin ‘Simple Image Widget by Blazer Six’?

    Thank you for sharing your expertise.
    Cheers,
    Yorinda

    Reply
    • Nile says

      September 26, 2013 at 4:56 am

      Never used it… but I’m willing to take a look at what is out there and may add more to this article to include whatever image widget plugins that work well.

      Reply
  13. Leslie Denning says

    September 28, 2013 at 1:11 pm

    Hi Nile. I enjoyed this tutorial. I put images in my sidebar by putting a text widget and then copy the URL from my media file. I’m not great with HTML, but necessity has forced me to learn more than I ever thought I would. You make things seem so much less complicated. Thanks!

    All the best,
    Leslie

    Reply
  14. Dr. Erica Goodstone says

    September 29, 2013 at 12:00 am

    Nile,

    I had seen that method explained once before and I forgot about it. That makes it so easy. Instead, I always have to go back to some other image and see how the html text was written and then add my new image html into that – especially when I want that image to link to a page somewhere else.

    Reply
  15. alan says

    September 29, 2013 at 3:03 am

    Its been a nice help for me Nile as I am a newbie in blogosphere & reading such a nice tutorials for learning these tricks and tips. Thank you for sharing this great tutorial which is of great use for all the newbies over blogosphere.

    Reply
  16. Rohit Dubey says

    September 30, 2013 at 1:20 pm

    Very helpful post i was searching this for a long while.
    thanks man.

    Reply
  17. rakesh kumar says

    October 2, 2013 at 2:52 am

    this post really help me thanks Nile

    Reply
  18. Tiffany C. Wright says

    June 14, 2014 at 12:55 am

    Thank you! I used option 2 to add images to my widget. I used the option with the link to another website for my call to action picture. It works like a charm. Thanks again!

    Tiffany C. Wright
    The Resourceful CEO

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Follow Me On:

  • Facebook
  • Instagram
  • LinkedIn
  • Twitter
  • YouTube

Get The Latest WordPress & Blogging Tips

Sign up for my newsletter, and also get my free ebook on 10 Reasons Why Your Website Isn't Converting, and How to Fix it!




Try to be More Positive on Social Media

Note: You can click on image and view the video in a larger lightbox window.

Footer

The Blog

Lots of free information, tutorials, and more to help you bring your best foot forward with your website.

  • Blogging
  • WordPress
  • Social Media
  • SEO
  • Web Design

Get The Latest WordPress & Blogging Tips

Sign up for my newsletter, and also get my free ebook on 10 Reasons Why Your Website Isn't Converting, and How to Fix it!

Copyright © 2025 · · WordPress