Sorry, this page is only available in one language

Image

Suggested dropletname: Image

Published by: Dev4me

This Droplet will create an image tag.
This can be usefull when you want to add an image in modules where there is no WYSIWYG editor or in your template.

$h = $w = $a = $t = "";
if (isset($height)) $h = "height:".$height."px; ";
if (isset($width)) $w = "width:".$width."px; ";
if (isset($alt)) $a = 'alt="'.$alt.'" ';
if (isset($title)) $t = 'title="'.$title.'" ';
return '<img src="'.WB_URL.MEDIA_DIRECTORY.$image.'" style="'.$w.$h.'" '.$a.$t.'>';

Required parameter

image=(image in mediafolder)

Optional parameters

width=(width)
height=(height)
alt=(alt text)
title=(title text)

Example

[[image?image=/foto/picture.jpg&title=My Image Title&alt=Alternate text&width=300&height=225]]



« Previous droplet | Overview | Next droplet »