# how do create a link with an external image

**URL:** http://forum.qcad.org/t/how-do-create-a-link-with-an-external-image/438
**Category:** dxflib 'How Do I' Questions
**Created:** [December 6, 2010, 12:52pm UTC](http://forum.qcad.org/t/how-do-create-a-link-with-an-external-image/438 "2010-12-06T12:52:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![AndyB78](http://forum.qcad.org/letter_avatar_proxy/v4/letter/a/d26b3c/32.png) [@AndyB78](http://forum.qcad.org/u/AndyB78)
#### Post date: [December 6, 2010, 12:52pm UTC](http://forum.qcad.org/t/how-do-create-a-link-with-an-external-image/438/1 "2010-12-06T12:52:40Z")

</div>

I tried to use the method “writeImageDef” but when I opened the dxf file with autocad the following error appears: “Unknown object type IMAGEDEF ignored”.

Which are the correct step to do add a background image in a dxf file?

Thanks in advanced for your help.

---

<div class="post-metadata">

### Author: ![andrew](http://forum.qcad.org/user_avatar/forum.qcad.org/andrew/32/14926_2.png) [@andrew](http://forum.qcad.org/u/andrew)
#### Post date: [December 6, 2010, 9:01pm UTC](http://forum.qcad.org/t/how-do-create-a-link-with-an-external-image/438/2 "2010-12-06T21:01:35Z")

</div>

- Write the image definitions inside the OBJECTS section of the DXF file (see DL\_Dxf::writeObjects / writeObjectsEnd).
- Write the image itself (writeImage) inside the ENTITIES section

---

<div class="post-metadata">

### Author: ![Dagata-mining](http://forum.qcad.org/letter_avatar_proxy/v4/letter/d/6de8d8/32.png) [@Dagata-mining](http://forum.qcad.org/u/Dagata-mining)
#### Post date: [April 3, 2022, 1:21am UTC](http://forum.qcad.org/t/how-do-create-a-link-with-an-external-image/438/3 "2022-04-03T01:21:32Z")

</div>

Any updates on that?? Been strugling for a bit and tried this approach without any succesz
