Add Strokes to Placed Images in Illustrator

Q. I’m having a problem with Illustrator that seems pretty basic, but I can’t figure it out. I placed a picture into my document, and I want to add a stroke around it. But when I do, the line doesn’t show up. What am I doing wrong?
A. I get this question a lot. Unlike InDesign, which has a concept of frames (and the frames have Fill and Stroke attributes), Illustrator is frameless. A placed image in Illustrator isn’t an object that can have Fills or Strokes. It’s not a vector shape and therefore lacks those attributes.
Most people use the Rectangle tool to draw a shape around the image. But even that’s too much work.
First, it’s important to understand that a placed image is not a vector object and hence, can’t have a fill or stroke attribute. So we’ll need to create another vector object to contain our stroke attribute. But I don’t want to create that object on my own. I want Illustrator to create it for me. There are two ways to accomplish this: have Illustrator automatically create a mask for the image; or use an effect to convert the bounds of the object into a vector object. Both have pros and cons and work better depending on the task at hand.
Technique #1: Use a Mask
This technique requires Illustrator CS3 and works only when your keyline will be rectangular in shape.

  1. Choose File > Place and choose an image to place into your Illustrator document. You can either Link or Embed the image. Once you’ve chosen the image, click the Place button.
  2. The image is selected (if your image already exists in your document, select it now), so if you look in your Control panel at the top of the screen, you’ll see a button labeled “MASK”. Click on it. This creates a mask at the exact bounds of the image.
  3. Press the “D” key for Default. This gives the mask a black 1 pt stroke attribute. Adjust the stroke per your design needs.

NOTE: An additional benefit to this method of using a mask is that you now have the elements in place to simulate a “frame and image” paradigm like InDesign. Once you’ve created your mask, you can decide to “crop” your image by double clicking anywhere on the photo. This will put you into Isolation Mode. Now click on the frame edge and resize at will. When you’re done, double click outside the image to exit isolation mode and continue working. This method works wonderfully when you’re using the Selection tool (black arrow) and have the Bounding Box option turned on (in the View menu).
Technique #2: Use an Effect
At first, it may seem that applying a keyline with the use of an Effect is a tedious process. But we all know that once we’ve applied an effect, we can store it as a Graphic Style, at which point applying our keyline will become a single click. Go ahead, ask me why Adobe doesn’t ship Illustrator with such an effect as a default setting in the NDPs (New Document Profiles). Go ahead, ask me why Adobe doesn’t allow us to assign keyboard shortcuts to styles like InDesign does. I don’t have answers to either of those questions (sorry). But let’s get on with the styles, shall we?
There are two separate effects that we can use, and each provides a different benefit.

  1. Choose File > Place and select an image to place into your Illustrator document. You can either Link or Embed the image. Once you’ve chosen the image, click the Place button.
  2. The image is selected (or if your image already exists in your document, select it). Open your Appearance panel and from the Appearance panel flyout menu, choose Add New Stroke. We can’t see the stroke yet, because all we have is an image. But we’ll change that in short order.
  3. With the Stroke highlighted in the Appearance panel, choose Effect > Convert to Shape > Rectangle. Check the Preview button, select the Relative option, and set both the Extra Width and Extra Height to zero (0). (Be careful not to press Tab after you enter the second value, or it will switch back to Absolute.) Click OK to apply the effect. Style the stroke attribute to match your design preference.
  4. Now make this easier to apply in the future. With the object still selected, open the Graphic Styles panel and click the New Graphic Style button at the bottom of the panel. Give the style an appropriate name. If you then add this style to your NDPs, it will be readily available in all new files that you create.

This technique obviously works only if your keyline is rectangular in shape. But what if your image had transparent areas in it? What if you silhouetted the photo in Photoshop (keeping the background transparent) and placed the PSD into Illustrator? There is a way to apply a stroke to the boundary of the art instead of to the boundary of the entire image. The method I’m about to show you will do just that, and will also do the job for rectangles as well.

  1. Choose File > Place and select an image to place into your Illustrator document. You can either Link or Embed the image. Once you’ve chosen the image, click the Place button.
  2. The image is selected (if your image already exists in your document, select it now). Open your Appearance panel and from the Appearance panel flyout menu, choose Add New Stroke. We can’t see the stroke yet, because all we have is an image. But we’ll change that in short order.
  3. With the Stroke highlighted in the Appearance panel, choose Effect > Path > Outline Object. If you’d like, style the stroke attribute to match your design preference.
  4. To make this easier to apply in the future, with the object still selected, open the Graphic Styles panel and click the New Graphic Style button at the bottom of the panel. Give the style an appropriate name. It’s a good idea to add this style to your NDPs so that it’s readily available in all new files you create.

If you’re applying this last effect to an image with no transparency, only the outside portion of the stroke will become visible. That is, if your stroke weight was set to 1 pt, only .5 pt of the stroke will be visible. To get the full 1 pt stroke, select the Stroke attribute in the Appearance panel and choose Effect > Path > Offset path. Then choose an offset amount that’s half the weight of the stroke. In our example, you would use a .5 pt offset value.
For even more fun, you can combine both of these effects by adding two strokes to your image, giving your transparent images a stroke around the bounds of the artwork as well as a keyline around the bounds of the entire image.

Bookmark
Please login to bookmark Close

This article was last modified on December 14, 2022

Comments (18)

Leave a Reply

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

  1. Cherylanne
    August 1, 2018

    Thank you for taking the time to write this out!
    So much easier in Freehand :/

  2. April 10, 2018

    I truly appreciate the easy to follow directions for completing a task that definitely should not be as difficult as it ends up being :) CreativePro/Mordy Golding is the real MVP!

  3. Robert Hoops
    May 10, 2016

    It’s 2016. We can land probes on asteroids. This shouldn’t be this hard. C’mon, Adobe. I can do this in half a second in PS/ID.

  4. March 24, 2016

    THANKS!!!!!!!

  5. Guest
    August 25, 2014

    Thank you!

  6. Kiersten
    July 25, 2014

    Thank you x 1 million

  7. faroe2k9
    July 10, 2014

    Thank u!!!

  8. Sirganit
    November 16, 2013

    I just used the pen tool, with smart guide, snap to points. And there it was, simple as that!

    1. kristens1
      May 10, 2018

      4+ years later…You are a genius!! Forget all this other stuff, people. The pen tool is the ticket. Thank You!!!

  9. Dejan N.
    May 8, 2013

    Very, very useful even after 5 1/2 years from posting!

  10. Anonymous
    March 30, 2012

    Too. LONG!

  11. Anonymous
    February 28, 2012

    Very good answer. Thank you.

  12. Anonymous
    March 24, 2010

    super helpful. THANK YOU!

  13. Anonymous
    October 1, 2009

    As mentioned, really great tutorial. Thorough, useful, and well explained. Just what I needed at a critical time at work. BUT I can not figure out what needs to happen to allow rotation of images using this effect. It seems like you can not apply this fabulous effect to a rotated image to begin with. Stroke does not apply or stay aligned once rotation is involved.

    1. March 24, 2016

      Follow the second set of instructions in Technique #2. Works for already-rotated place images (AI CC 2015).

  14. Anonymous
    July 31, 2009

    Your instructions were clear and concise and allowed me to place a stroke around a placed image easily. As a beginner in Illustrator, I really appreciate it!

  15. Anonymous
    July 21, 2009

    This is an amazing post – we need more people like you explaining these things to the rest of us! :)

  16. Anonymous
    May 16, 2009

    This was exactly what was needed! Works exactly like this in CS4 also.