imagefile

Summary

Loads an image from a file.

Usage

imagefile( filename )

Parameters

NameTypeDescriptionRequired
filename string The image file that should be loaded. Yes.

Returns

An ezimagelayer object.

Description

This operator loads an image from the filesystem and returns it as an "ezimagelayer" object. The location and the name of the file must be specified in the same way as it is shown in the example below (the whole path must be specified without a starting slash). Please note that this operator will only work if "ImageGD" is installed and enabled.

If this operator is called directly, eZ publish will display the specified image using the "image.tpl" template located in the "templates/image/" directory of the current design or one of the fallback designs. It is possible to override this template using the template override system. An image layer can be provided as a parameter to the "image" operator.

Examples

Example 1

{imagefile( 'design/example/images/test.png' )}

This will load "test.png" from the specified directory and display it using the image layer template.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.