Returns the location of an image. Do not include the extension in $imagename. The function will look for all possible extensions (.png, .gif, and .jpg) unless you specify $extension. It first searches in the primary theme's "/images" directoroy for the existence of the image. If it is not there, it searches the core theme's "/images" directory. If it's not there, it returns a null value.
- string $imagename: The name of the image to be retrieved. Ex: 'logo'.
- string $extension: (Optional) The file extension of the image to be retrieved. Ex: 'png', 'gif', or 'jpg'.
Example:
<?php if (getImage('logo')) echo '<img src="'.getImage('logo').'" alt="Logo" />'; ?>
See also: getLogo()