Documentation Center

Handling an image in a Multimedia Component

Handle images using customized HTML fragments.

Dreamweaver Template solution
You can handle images in Multimedia Components using customized HTML fragments in a Compound Template (typically a Dreamweaver Template) as follows:
  • 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.
Non-Dreamweaver Template solution
Only if your Compound Template uses does not use a Dreamweaver Template:
  • 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.