Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.



Loads an image from a file.


imagefile( filename )


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


An ezimagelayer object.


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.


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.

Balazs Halasy (05/02/2004 10:38 am)

Balazs Halasy (04/05/2005 1:57 pm)


There are no comments.