Handling an image in a Multimedia Component

In a Compound Template, you can handle a Multimedia Component in the following ways:

  • You can directly display the image.
  • You can create a hyperlink to the Multimedia Component, which, on the published Web site, results in a hyperlink to a Web page that contains the image.
  • You can create a hyperlink to the image file, which, on the published Web site, results in a hyperlink to the image resource.

All of these ways of handling images are done using customized HTML fragments, typically added in a Dreamweaver Template. Only if your Compound Template uses no Dreamweaver Template, follow these instructions:

  • To directly display the image, include code of the form <img src="tcm:6-2" tridion:type="Multimedia" /> in the output, where tcm:6-2 is the Content Manager URI (identifier) of the Multimedia Component that contains the image. On the published page, this results in the output <img src="pictures/Image01.jpg" />, where pictures/Image01.jpg is your image file.
  • To create a hyperlink to the Multimedia Component, which, on the published Web site, results in a hyperlink to a Web page that contains the image, include code of the form <a href="dummy.html" tridion:href="tcm:6-2" tridion:type="Component">link text</a> in the output. On the published page, this results in the output <a href="PageWithPicture.html">link text</a>, where PageWithPicture.html is a Web page that contains the image.
  • To create a hyperlink to the image file, which, on the published Web site, results in a hyperlink to the image resource, include code of the form <a href="dummy.html" tridion:href="tcm:6-2" tridion:type="Multimedia">link text</a> in the output. On the published page, this results in the output <a href="pictures/Image01.jpg">link text</a>, where pictures/Image01.jpg is your image file.