This project has moved and is read-only. For the latest updates, please go here.

markup with image problem - image src does not get resolved

Jan 7, 2010 at 9:45 PM
Edited Jan 7, 2010 at 10:14 PM

I have a problem with the img tag in <markup> element.

I added image to the project and set the BuildAction to Image.

Set the ImageId to the name of the file.

Here is the code I am using.


            <img src="../media/Image.jpg" USEMAP="#usecase" BORDER="0" height="686" width="1183"/>
              <map name="usecase">
                <area shape="rect" coords="0, 0, 219, 226" href=""  alt="" title=""/>
                  <area shape="rect" coords="477, 159, 689, 274" href="01ac38c0-6b1d-2db7-db7d-1fe9f6f49909.htm"  alt="a" title="a"/>
                    <area shape="rect" coords="503, 48, 665, 136" href="128dde81-2b74-2cd8-ac66-2aeed5f8abbc.htm"  alt="b" title="b"/>
                      <area shape="rect" coords="471, 306, 694, 424" href="acdf7f16-4d87-5f21-ea54-6e25af915712.htm"  alt="c" title="c"/>
                        <area shape="rect" coords="484, 442, 684, 547" href="b59b2f60-13a8-d62a-8dfe-9ad6ba99d3d3.htm"  alt="d" title="d"/>
                          <area shape="rect" coords="470, 566, 698, 685" href="d50845bb-d905-47ee-fb97-410abfcaeff2.htm"  alt="e" title="e"/>
<!-- if I add mediaLink the image above works but then I get 2 images in the doc -->
          <image xlink:href="Image.jpg"/>

If I remove the <mediaLink> element referencing the image I also loose the the img in the <markup> element.

what am I doing wrong?



Sorry again, false alarm.

Found this conversation

setting the CopyToMedia to true resolved the problem.




Jan 8, 2010 at 3:26 AM

Just to clarify, the Image build action is only for images referenced by the MAML mediaLink and mediaLinkInline elements.  For all other HTML image elements, the BuildAction should be set to Content so that it gets copied into the build output as a content item.  Using Image and setting the CopyToMedia property works to but you just have to remember to set it.



Jan 8, 2010 at 4:09 AM
Eric thank you very much for the clarification.