Add a Border or Keyline to an Image in Photoshop

Quick Method of Adding a Border or Keyline to an Image on Photoshop

Sometimes adding a white, or black, or other colour border around an image can enhance the final effect.

This method is a quick and easy way to do so in Photoshop (any version).

---

Adding a Stroke or Keyline


Both Photoshop and Elements have a simple way to add a thin line to the edge of an image, especially useful for adding a light keyline to a pdi or a keyline to an image for print. It is the last thing to do aer the image has been edited, resized and, if needed, had a final sharpening.

Simply Select|All (or Ctrl+A) then Edit|Stroke. Select 2px (enough for a pdi), white (can use an alternative colour if desired) and Inside. Press OK and Select|Deselect (Ctrl+D).

Then you can save as a jpeg as normal.

A PDF with instructions and menu pictures can be downloaded below.


JSW, Feb 2026

-----------

Adding a keyline in Lightroom

Lightroom does not have a way to add a keyline, except for the opon in the Print Module. However, if you really want to do it from Lightroom there is a third-party plug-in called LR/Mogrify (!) which inserts a stage into the Export dialogue.

Download LR/Mogrify from https://www.photographers-toolbox.com/products/lrmogrify2.php. PC users will also need to download and install ImageMagick 7 which you can get via this site. Mac users do not.

PC users install ImageMagick.

Extract the folder LRMogrify2.lrplugin from the zip folder and move it to a convenient location (I suggest the same folder as the Lightroom catalogue files) and remember where it is!

Open Lightroom and select Edit|Plug-in Manager. Add and navigate to the location where you saved the
LRMogrify2.plugin folder. Select it to install the plug-in.

Using LRMogrify

Export” the image. You will see:

(1), under Post-Process Actions, LR/Mogrify2.

(2) Select Inner Borders and (3) Insert to add LRMogrify to the Export dialogue.

As you work down the Export steps, ignore Mogrify Configuration.

(4) Reach Mogrify Inner Border Options. With Identical Borders checked (5), set Inset to 0 and Size to 2 pixels (6).


Select the colour you want (7).

Export as normal and check the export file to show the keyline has been added.

----------

An alternative method uses Photoshop together with Lightroom...

1) Load your image into Photoshop (From Lightroom use 'Edit In Photoshop)

2) Goto Image on the top menu, and then Canvas Size.

3) Check the Relative box and then enter the desired width of the keyline in the Width and Height boxes. (This can be any size but for a 1920 picture around 10-15 pixels can look nice - you will need to experiment)

At the bottom under Canvas Extension Colour, select the colour you want (defaults to white).

4) Click OK, and the border will be displayed around the image.

5) Now you need to resize the image because it is a little too big. Goto Image again and then Image Size

6) Select 1920px for the longest side and click OK

7) Export as JPG as usual or Save to re-load into Lightroom.

You should now have a correctly sized image with a keyline around.