BIM

Attaching images in AutoCAD: the drawing keeps only a path

Attaching images in AutoCAD stores a path, never the picture itself. We weighed the files on AutoCAD 2027 and found the simplest way to keep images.

  • TS. Đỗ Quốc Hoàng
  • 9 min read
The same drawing on AutoCAD 2027: with the image file present it renders in full, without it only an empty frame remains Photo: Screenshot taken on AutoCAD 2027 at the Institute

You attach a photograph of a site plan to a drawing, send the file to a colleague, and they open it to find an empty rectangle. Where did the picture go? This happens daily to people attaching images in AutoCAD, and the cause is one simple fact that few guides ever state.

This article weighs the files on AutoCAD 2027 at the Institute to show exactly where it breaks. For a proper grounding in references and issuing drawings see our AutoCAD for Construction course.

The drawing does not hold the picture, only a path

We ran a blunt test. Make an empty drawing, save it, note the size. Attach a PNG of over three megabytes, save again, note the size. Then subtract.

Weighing the files Photo: The size of the .dwg file before and after attaching an image, measured on AutoCAD 2027
Weighed on diskSize
The PNG file being attached3,245,447 bytes
The drawing with nothing in it15,365 bytes
The drawing after attaching the image25,178 bytes
What the drawing gained9,813 bytes, or 0.3% of the image file

That number says everything. The drawing grew by under ten thousand bytes for a picture of over three million. It does not contain the picture. It contains the path to the picture, plus a little information about position and size.

Autodesk puts it the same way on the About Attaching Raster Images page for the 2027 release. First: "Images can be referenced and placed in drawing files, but like external references (xrefs), they are not actually part of the drawing file". Then: "The image is linked to the drawing file through a path name".

Once that is clear, everything else about attaching images in AutoCAD follows easily.

How to attach an image, and which command does it

Read straight out of the acad.cuix interface file of the 2027 release on the machine.

CommandAliasRibbonClassic menu
IMAGEATTACHIATnoneInsert → Raster Image Reference
ATTACHnoneInsert → Reference → AttachFile → Attach
IMAGEIMnonenone
EXTERNALREFERENCESERnoneInsert → External References

One point catches people out. IMAGEATTACH has no ribbon button at all. The button at Insert → Reference → Attach is the ATTACH command, the general one for every kind of reference, and it attaches images perfectly well. Click users want ATTACH; typists are quicker with IAT.

The management palette opens with ER. That is where you can see what state each image is in.

The steps themselves:

StepWhat you do
1Copy the image file into the drawing's own folder, before anything else
2Type IAT, pick the file, click Open
3Untick Specify on-screen if you would rather type the insertion point
4Click OK, then click a point for the bottom-left corner
5Type a scale factor, or drag and click

Step 1 is the one that matters most, and it appears in no dialog at all. The next section explains why.

On that scale factor, we measured it: a 1200 × 900 pixel image attached at a factor of 1000 comes out 1000 × 750 drawing units, and at 3000 it comes out 3000 × 2250. The factor is the image width in drawing units, with the height following the original proportions.

Keeping the image from going missing when you send the file

This is what most people come looking for, and the fix is simpler than they expect.

We set the test up like this. Attach the image while both files sit in the old folder and save. Then copy both the drawing and the image into a completely different folder and delete the originals. The path recorded inside the drawing now points at nothing.

Open the drawing in its new place. Result: the image still renders in full, the palette reports the status Loaded, and reloading prints the new path.

In other words, when AutoCAD cannot find the file at the stored path, it looks next in the folder holding the drawing. That is why this one rule beats every trick going:

Keep the image file in the same folder as the .dwg, and send the whole folder.

The picture at the top of this article is the control. Same drawing, image file simply removed and reloaded, and the program reports Unable to reload with nothing but the frame left on screen. Nothing can recover it from the drawing, because the picture was never in there.

For issuing a set of several files, use ETRANSMIT at File → eTransmit. It packages the drawing together with everything it references, so nothing is left behind.

Scaling an image to real size

A photograph carries no units, so once attached it is almost certainly the wrong size. Getting it right takes three moves.

First find something on the picture whose true length you know for certain: a wall marked 12 m, or a scale bar printed on a survey. Draw a line exactly over it.

Then select the image, type SC for the scale command and choose the Reference option. When asked for the old length, click the two ends of that line; when asked for the new length, type the real figure. The image snaps to size. Using that option is covered in our article on the scale command.

If the picture is also askew, use AL to rotate and place it in one pass, as described in our article on the align command.

One habit worth forming: scale the image before drawing over it. Scale it afterwards and everything you drew has to be scaled too, and missing a single line ruins the set.

Clipping an image and hiding the image frame

Photographs usually carry surplus: paper edges, a thumb, the desk. There is no need for another program.

Type ICL for IMAGECLIP. The sequence, copied verbatim from the 2027 release:

Select image to clip:
Enter image clipping option [ON/OFF/Delete/New boundary] <New>:

Choose New, draw round the part worth keeping, and the rest disappears from view. This is a display clip, untouched on the original file, so choosing Delete brings the whole picture back.

The border round the image is governed by the IMAGEFRAME variable. Measured on the machine, it defaults to 1, and it takes three values:

ValueWhat the program does
0no frame shown and none plotted
1frame shown and plotted
2frame shown on screen but not plotted

Value 2 is the one worth knowing for issuing drawings: you can still click the image to select it, but the printed sheet comes out clean. The screen redraws the moment you set it.

To lighten a dark picture, type IAD. It asks Enter image option [Contrast/Fade/Brightness] <Brightness>:. The Fade option suits a picture used as a background to trace over.

When the picture vanishes: where to look and how to mend it

The ER palette shows the status, but the command-line version is quicker. Type -IMAGE and the program offers:

Enter image option [?/Detach/Path/Reload/Unload/Attach/Show] <Attach>:

Choose ? and press Enter twice, and it lists every image with the path it is holding. That is where you see at a glance what points where.

Three of the other options mend nearly everything:

Path repoints a stray image. Use it when the file has moved to another drive.

Reload refreshes. Use it after editing the picture in another program, or after copying the file back where it belongs.

Detach removes the image from the drawing entirely. Erasing the image object is not enough: the image definition stays in the drawing and keeps holding the file.

One measured detail almost nobody mentions: while an image is loaded, Windows will not let you delete or rename that file, reporting that another process is using it. To tidy up, Unload or Detach first.

Images also do not appear in the -XREF list. We checked: a drawing with one image attached still reported Total Xref(s): 0. The two are managed separately even though the ER palette shows both. Drawing references are covered in our article on xrefs in AutoCAD.

Four things people say that are not true

What people sayWhat the 2027 release actually does
An attached picture lives inside the drawing fileIt does not. The drawing gained 9,813 bytes for a 3.2 MB picture
Only JPEG and BMP can be usedThe PNG we attached worked normally, rendered in full and reloaded
Erasing the image object finishes the jobThe image definition remains and keeps holding the file. Use Detach
To stop images vanishing you must paste through WordNo need. Keep the file in the drawing's folder and the program finds it

Attaching images in AutoCAD, put simply, creates a link rather than a copy. Keep the link intact and the picture never goes missing.

Frequently asked questions

Which command attaches an image?

Type IAT for IMAGEATTACH, or click Insert → Reference → Attach on the ribbon, which runs ATTACH.

Why does the recipient see no picture?

Because the drawing holds only a path. Send the image file too, ideally in the same folder, or package everything with ETRANSMIT.

Is keeping the image in the drawing's folder really enough?

Yes. We moved both files to another folder, killing the stored path completely, and the picture still rendered with the status reported as Loaded.

How do I stop the border printing round the image?

Set IMAGEFRAME to 2. The frame stays visible on screen for selecting, but never reaches the paper.

How do I get the picture to real size?

Draw a line over something of known length on it, then use SC with the Reference option, giving the old length and the true one.

Why will Windows not let me delete the image file?

Because a drawing is open and has it loaded. Type -IMAGE, choose Unload or Detach, and then it will delete.

About the author

TS. Đỗ Quốc Hoàng — Vice Director of the Institute of Information Technology in Civil Engineering, Hanoi University of Civil Engineering, and a specialist in software development for construction