image tag is used to place
image files, such as JPG, GIF, and PNG, into modules. Any image file with a valid
MIME type
can be included on the page.
This CNXML:
<media id="greyhound"
alt="A greyhound relaxing on a bed.">
<image mime-type="image/jpeg"
src="image1.jpg" />
</media>
Results in this display:
This CNXML:
<media id="greyhound"
alt="A greyhound relaxing on a bed.">
<image mime-type="image/jpeg"
src="image1.jpg" />
<image mime-type="application/postscript"
src="image1.eps"
for="pdf"/>
</media>
Results in this display:
This example demonstrates the use of the for attribute to specify an alternate image for the PDF version
of the module. The Web-ready JPEG image, here used as the default option, will be displayed when viewing the module online and the second image, a higher-resolution EPS file, will be used for the PDF version.
<media> element will only be displayed for the version(s) specified.
image. The thumbnail file will
automatically link to the larger image file set in the "src" attribute.