function theme_image


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 theme_image($variables)
cle7 theme_image($variables)
elmsmedia7 theme_image($variables)
icor7 theme_image($variables)
meedjum_blog7 theme_image($variables)
mooc7 theme_image($variables)

Returns HTML for an image.


$variables: An associative array containing:

  • path: Either the path of the image file (relative to base_path()) or a full URL.
  • width: The width of the image (if known).
  • height: The height of the image (if known).
  • alt: The alternative text for text-based browsers. HTML 4 and XHTML 1.0 always require an alt attribute. The HTML 5 draft allows the alt attribute to be omitted in some cases. Therefore, this variable defaults to an empty string, but can be set to NULL for the attribute to be omitted. Usually, neither omission nor an empty string satisfies accessibility requirements, so it is strongly encouraged for code calling theme('image') to pass a meaningful value for this variable.

  • title: The title text is displayed when the image is hovered in some popular browsers.
  • attributes: Associative array of attributes to be placed in the img tag.

Related topics

33 theme calls to theme_image()
adaptivetheme_preprocess_page in sites/all/themes/ulmus/adaptivetheme/at_core/inc/
Preprocess variables for page.tpl.php
corolla_tablesort_indicator in sites/all/themes/ulmus/corolla/template.php
Returns HTML for a sort icon.
ctools_ajax_image_button in sites/all/modules/ulmus/ctools/includes/
Render an image as a button link. This will automatically apply an AJAX class to the link and add the appropriate javascript to make this happen.
ctools_ajax_sample_page in sites/all/modules/ulmus/ctools/ctools_ajax_sample/ctools_ajax_sample.module
Page callback to display links and render a container for AJAX stuff.
ctools_modal_add_js in sites/all/modules/ulmus/ctools/includes/

... See full list

184 string references to the theme hook from theme_image()

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

adaptivetheme_preprocess_field in sites/all/themes/ulmus/adaptivetheme/at_core/inc/
Preprocess variables for field.tpl.php
adaptivetheme_preprocess_page in sites/all/themes/ulmus/adaptivetheme/at_core/inc/
Preprocess variables for page.tpl.php
aggregator_element_data in modules/aggregator/
Performs an action when data is encountered.
aggregator_element_end in modules/aggregator/
Performs an action when a closing tag is encountered.
aggregator_element_start in modules/aggregator/
Performs an action when an opening tag is encountered.

... See full list


includes/, line 1784
The theme system, which controls the output of Drupal.


function theme_image($variables) {
  $attributes = $variables['attributes'];
  $attributes['src'] = file_create_url($variables['path']);

  foreach (array('width', 'height', 'alt', 'title') as $key) {

    if (isset($variables[$key])) {
      $attributes[$key] = $variables[$key];

  return '<img' . drupal_attributes($attributes) . ' />';



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.