image

toc
<mm:image>

Returns an URL to the image servlet. This is a NodeReferrer and consequently has to live as a child of a (image) node.

Using this tag makes your pages more portable to other system, and hopefully less sensitive for future changes in how the image servlet works.

attributes
  • template

    A `transformation' template.

    In the font option, mm: stands for `mmbase configuration directory'. In this way it is easy to make sure that fonts are available.


    s(100x100)
    s(200x200!)+font(mm:fonts/Arial.ttf)+fill(ffffff)+pointsize(20)+gravity(NorthEast)+text(0,20,'MM Base')
    s(180)+modulate(120,0)+gamma(1/1/2)+bordercolor(8c9c23)+border(10x0)
    s(200)+fill(ffffff)+circle(20,20 30,30)
    s(200x200!)+part(100,100,150,150)
    s(200)+fill(ffffff)+draw(rectangle 100,100 150,150)+dia+flipx
    s(200)+colorizehex(f01010)
    s(200)+f(gif)+paint(10)
    s(100x100>)Fit to 100x100 if it is bigger
  • mode

    What to produce.


    urlAn URL to the image (default)
    attributesThe attributes 'src' 'height' and 'width' for the img-tag of HTML.
    imgA img-tag of HTML
  • element (since: MMBase-1.7.4)
    see: element attribute of node
  • width

    This width is used for a re-size of the image when no `transformation' template is provided.


  • height

    This height is used for a re-size of the image when no `transformation' template is provided.


  • crop

    Defines if an image should be cropped when no `transformation' template is provided. The image will be cropped when it does not fit the re-size area defined by the height and width attributes.


    beginThe re-size area will be positioned at the left top corner.
    middleThe re-size area will be positioned in the middle.
    endThe re-size area will be positioned at the right bottom corner.
  • styleClass

    Class attribute of html img-tag. Only applied when mode=img.


  • style

    Style attribute of html img-tag. Only applied when mode=img.


  • align

    Align attribute of html img-tag. Only applied when mode=img.


  • border

    Border attribute of html img-tag. Only applied when mode=img.


  • hspace

    Hspace attribute of html img-tag. Only applied when mode=img.


  • vspace

    Vspace attribute of html img-tag. Only applied when mode=img.


  • alt (since: MMBase-1.8.5)

    Alt attribute of html img-tag. Only applied when mode=img.


nodereferrer attributes
writer attributes
contextwriter attributes
contextreferrer attributes
example 1
    <mm:node number="<%= image_number %>">
        <img src="<mm:image template="s(100)" />" width="100" border="0">
    </mm:node>