The img()
method
This method allows the server side scaleing of images.
Parameters:
Name | Description |
java.lang.String target | The VFS-Path to the image to scale. |
org.opencms.loader.CmsImageScaler scaler | The configured image scaler to scale the image. |
java.util.Map attributes | Additional image HTML attributes. |
Parameters:
Name | Description |
java.lang.String target | see above |
org.opencms.loader.CmsImageScaler scaler | see above |
java.util.Map attributes | see above |
java.lang.boolean partialTag | If true, the opening "<img" and closing ">" is omitted. |
Example usage:
Include the direct edit scriptlet.
org.opencms.jsp.CmsJspActionElement cms = new org.opencms.jsp.CmsJspActionElement(pageContext, request, response); org.opencms.loader.CmsImageScaler scaler = new org.opencms.loader.CmsImageScaler(); scaler.setWidth(50); out.println(cms.img("/system/modules/com.alkacon.documentation/resources/logo_opencms.gif", scaler, new java.util.HashMap(), false) );