How to Add a Border to a Picture in WordPress

Photo of author

By Oluwaseun Bamisile

Published

Do you want to add a border to a picture on your WordPress site but don’t know how? This guide was written for you, as it features multiple methods to achieve that.

Option 1: Add a Border to a Picture via WordPress Block Editor

One way to add a border to a picture on your WordPress site is through the default WordPress block editor. However, not all versions of WordPress offer an option to add a border to an image through the block editor.

Basically, the option is only available in WordPress version 5.0 or higher. Thus, any WordPress version before version 5.0 won’t have the option to include a border to an image via the block editor.

That being said, follow the procedures below to add a border to a picture on your WordPress website via the WordPress block editor.

  1. Sign in to the backend dashboard of your WordPress website as an administrator. Then, click Posts or Pages among the options on the left pane, depending on where you want to add a border to an image.
  1. Following that, click the title of the page/post where you want to add a border to a picture to open it. For this demonstration, I will open a post titled “Redacting” on our WordPress site.
Add A Border To A Picture In WordPress Via WordPress Block Editor
  1. When the post/page opens, left-click the Add block icon in the area you wish to upload the picture to which you want to add a border. Next, type “image” in the search field, then select the Image block from the search result.
If the image to which you want to add a border is already uploaded to the page/post, move on to step 5.
  1. In the Image block, click the blue Upload button.
Add A Border To A Picture In WordPress Via WordPress Block Editor
  1. Consequently, the Open window should automatically launch. Hence, navigate to the location where you stored the image you wish to upload, then double-click the image to upload it.
  1. After uploading the image, click it and ensure the Settings panel is selected and opened.
Add A Border To A Picture In WordPress Via WordPress Block Editor
  1. Now, click Borders under the Styles category in the Block tab on the Settings panel. Hence, you will notice a black border surrounding the selected image.

Option 2: Add a Border to a Picture Using a Plugin

Another way to add a border to a picture in WordPress is with the help of an image editor plugin. Although there are quite a number of image editor plugins out there, I recommend the WP Paint plugin.

Hence, read How to Install and Activate WP Paint Plugin in WordPress to learn how to install and enable this plugin on your WordPress site. Then, follow the procedures below to learn how to use the plugin to add a border to a picture in WordPress.  

  1. After you’ve installed and activated the plugin, ensure you are logged in as an administrator on your WordPress site’s backend. Then, click Media among the options on the left pane of the backend.
Add A Border To A Picture In WordPress Using A Plugin
  1. In your WordPress Media Library, select the image to which you want to add a border. Thus, the image’s Attachment details page should open.
If the picture to which you want to add a border isn’t in your WordPress media library, go through our How To Upload A Picture To WordPress Media Library article.
  1. In the Attachment details page, click the Edit Image using WP Paint button under the picture. Hence, the WP Paint image editor plugin should open.
Add A Border To A Picture In WordPress Using A Plugin
  1. Now, click the Tools menu at the top of the WP Paint image editor plugin page. Then, select Borders … from the options that appear.
  1. After that, click the color palette button on the Borders page to select a preferred color for the border.
Add A Border To A Picture In WordPress Using A Plugin
You can turn on the Shadow toggle if you wish to add a shadow to the border.
  1. Then, use the Size slider to increase or decrease the thickness/width of the border.
Add A Border To A Picture In WordPress Using A Plugin
  1. After customizing the border to your satisfaction, click the Ok button at the bottom of the Borders page.
  1. Now, click the blue Save image button at the top left of the WP Paint image editor plugin page to save the change.
Add A Border To A Picture In WordPress Using A Plugin
  1. Lastly, click the “x” sign at the top right corner of the page to close the image editor plugin.

Option 3: Add a Border to a Picture Using HTML

Interestingly, you can also add a border to a picture on your WordPress site using HTML. However, HTML can be daunting for those without HTML knowledge.

Nonetheless, I will make the procedures as simple as possible. Hence, follow the steps below to add a border to an image in WordPress using HTML.

  1. First, log in to the backend dashboard of your WordPress site as an admin. Then, depending on where you want to add a border to a picture, click Posts or Pages on the left pane.
  1. After that, left-click the title of the page/post where you want to add a border to a picture to open it. In this case, I will open a post titled “Hello” on our WordPress site.
Add A Border To A Picture In WordPress Using HTML
  1. When the post or page opens, click the Options icon at the top right corner and select Code editor.
  1. Now, input the HTML code below in the area you want to include a border to an image. However, replace “image URL” with the URL of the picture to which you want to add a border.
Go through our How to Find Image URL in WordPress article to learn multiple ways to get an image’s URL in WordPress.

Also, replace “size” with a pixel value, depending on how wide you want the border to be. Additionally, replace “color” with the name of your preferred color for the border.

<img src="image URL" style="border: size solid color;">

Thus, the code should appear as follows if I wish to give my preferred image a red border that is 5 pixels wide.

<img src="https://wp.blogsandbox.co.uk/wp-content/uploads/2023/01/2023-01-10-12_31_52-Clipboard-3.jpg" style="border: 5px solid red;">
Add A Border To A Picture In WordPress Using HTML
  1. Finally, click the Exit code editor button. Hence, the image should appear with the border and a classic WordPress editor toolbar at the top – see the second screenshot.
Add A Border To A Picture In WordPress Using HTML

Frequently Asked Questions

1. Can I add a border to a PNG image in WordPress?

Yes, you can add a border to any format of image in WordPress, including PNG images.

2. Can I remove a border from a picture in WordPress?

Sure, you can remove a border from a picture on your WordPress website.

3. What programming language was used to create WordPress?

WordPress was primarily developed using the PHP programming language. As a matter of fact, the plugins and themes available in WordPress were all developed using PHP.

4. What is an image border?

An image border is an outline that surrounds or frames a picture.

5. Can I add a border to a picture that is already in my post or page?

Yes, you can add a border to an image that is already in your WordPress post or page.

Conclusion

Adding a border to a picture is a simple yet effective way to improve the visual appeal of your WordPress website. This will make specific images on your website stand out from others and help draw attention to them.

Gladly, this guide demonstrated numerous ways to add a border to an image in WordPress. To be specific, we discussed how to execute this task through the default WordPress block editor.

I also provided steps to add a border to a picture in WordPress using a plugin. That’s not all; this guide also included procedures to perform this task using HTML.

I hope this guide was able to help you add a border to an image on your WordPress website. If it was, click on “Yes” beside the “Was this page helpful” question below.

You may also express your thoughts and opinions by using the “Leave a Reply” form at the bottom of this page.

Lastly, visit our WordPress & Websites How-To page to access other helpful WordPress guides.

About the Author

Photo of author

Oluwaseun Bamisile

Oluwaseun is the Lead Content Editor at Itechguides.com. He holds a National Diploma in Computer Science (currently studying part-time for his Higher National Diploma). An internet geek with a love for automobiles, he writes product reviews, tech articles, and how-to guides on the site.

Related Articles

Get in Touch

We're committed to writing accurate content that informs and educates. To learn more, read our Content Writing Policy, Content Review Policy, Anti-plagiarism Policy, and About Us.

However, if this content does not meet your expectations, kindly reach out to us through one of the following means:

  1. Respond to "Was this page helpful?" above
  2. Leave a comment with the "Leave a Comment" form below
  3. Email us at [email protected] or via the Contact Us page.

Leave a comment

Send this to a friend