This tutorial will show you how to add an image to widget in WordPress.
In order to add an image to widget, follow the steps listed below:
First of all, you need to upload a new image to your WordPress website.
Log into your WordPress admin panel and navigate to Media tab:
Click on Add New button, then click on Select Files and upload the image that you want to see in a widget:
After uploading the image you need to click on the image to copy its URL:
You will see Edit Media page. The image URL is located on the right side of the screen. You need to copy this URL and paste it in any text editor (like Notepad):
Now, navigate to Appearance -> Widgets tab and drag-and-drop a Text widget from list of available widgets on the left to the widget area where you want to display the image on the right:
In the text box area of the widget, you need to add your image using HTML code:
<img src="Paste The File URL Here" alt="Image Title"/>
where in attribute src you need to define the file path to your image. Paste the URL of your image in ” ” (it will look like this):
<img src="http://www.example.com/wp-content/uploads/2015/05/image_1.jpg" alt="Image_1" />
in attribute alt you need to define an alternate text for the image. It will be displayed if the image is missing:
Click on Save button and refresh your website to see the image. You will see that the image was successfully added to the widget:
Now you know how to add an image to widget in WordPress.
Feel free to check the detailed video tutorial below: