Do you want to add more functionality to your WordPress site? Then why don’t you try using widgets? These useful blocks, commonly located on the sidebar, can add impactful features to your website.
With widgets, you can display additional content – your social media feed, email signup form, or images. In this article, you will learn how to create a WordPress image widget and add it to your site.
Before I show you how to do it, you need to know that photos don’t only belong inside posts. Having them appear outside, like a sidebar, is a good idea and can potentially bring you many benefits, which I’ll explain in just a moment.
WordPress Image Widget
Why would people still want other pictures to appear in their sidebar? Isn’t it enough to pack them in a post? Well, it turns out, many great websites are using image widgets for the following reasons:
- Branding. Owners can upload content-related images to strengthen their brand. For example, they can show portraits, photos of featured products, or promotional posters.
- Advertisements. Image widgets allow you to put ad banners on your site’s unused space. That way, you’ll have an opportunity to increase your income.
- Aesthetic. You can enhance the look of your website by placing pictures on the sidebar. You just have to make sure it compliments the overall theme/appearance of the site.
- Clickable images. Do you want to make people stay longer on your site? You can insert a link on your pictures that will direct readers to another page.
Despite its versatility, the WordPress image widget can be easily installed without any previous coding knowledge whatsoever.
Creating a WordPress Image Widget in Three Ways
When it comes to creating a WordPress Image Widget, you basically have three methods — the default upload option, via a custom HTML, and using a text widget.
Let’s start with the most widely-used practice.
1. The Default Option
This method is recommended because it’s easy and uploads the image in an instant.
- On your WordPress admin page, go to Appearances -> Widgets. Then, choose Image and click Add Widget.
- You can write a title for the widget first. After that, click Add Image to pick one from your media library or computer. Once that is done, choose Add to Widget. Now you can save it and publish it on your site.
Keep in mind that, in order to get the most out of your image, you need to put more information on it before you publish the widget.
There are mandatory columns you need to fill in, such as Title and Alt Text, which will be beneficial for SEO. You can also write the caption and description if you want.
Under the Attachment Display Settings, you are allowed to resize the image and add a targeted URL. Insert a link if you want to bring visitors to another page when they click the photo.
2. Custom HTML
Uploading an image through custom HTML widget can be useful when you need to insert lines of HTML code alongside the picture. Here is how it’s done.
- The specified photo should be uploaded to the Media Library first. To do that, enter the Media menu and click Add New.
- After you upload the image, click on it. You’ll see the URL column – copy it.
- Now that you have the link, navigate to Appearance -> Widgets. This time, pick Custom HTML. After that, you need to paste in the URL using this order:
<img src="Your image URL here" alt="Your alt text here" />
- Replace the words in the quotation marks with the actual link of your image and its Alt Text. Then, click Save.
3. Text Widget
Another alternative of adding image on the sidebar is via the text widget. Using this method, you will be able to show additional information on the picture.
- Go to the Widgets menu and choose Text.
- Click Add Media and then upload your photo.
Unlike the previous two, this method allows you to add text. In the editor box, there are options to bold or italicize words, make an ordered or unordered list, as well as insert a hyperlink.
Therefore, be sure to customize it before you publish the picture!
Try It Yourself!
The WordPress Image Widget is a little useful added touch that can be beneficial for your website. It allows you to strengthen your branding, get more money, enhance the looks of your page, and encourage your visitors to stay longer.
To sum it all up, here’s an overview of the three methods used to add images on your sidebar.
- Using the default method — it is the easiest way to add an image widget to your site. You only need to go to the Widgets menu on WordPress, choose Image, and upload the intended picture.
- Custom HTML — this method might be preferred by those who want to put HTML code alongside the photo. You are required to copy the image URL first and then choose Custom HTML on the Widgets menu.
- Text Widget — if you want to give some information along with your image, Text Widget is the one to pick. You have the option to choose Text in the settings and format the content in the editor box.
That was easy, right? Now let’s try one of these options on your website!