function theme_image_widget


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_widget($variables)
cle7 theme_image_widget($variables)
elmsmedia7 theme_image_widget($variables)
icor7 theme_image_widget($variables)
meedjum_blog7 theme_image_widget($variables)
mooc7 theme_image_widget($variables)

Returns HTML for an image field widget.


$variables: An associative array containing:

  • element: A render element representing the image field widget.

Related topics

2 string references to the theme hook from theme_image_widget()

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.

image_field_widget_process in modules/image/
An element #process callback for the image_image field type.
image_theme in modules/image/image.module
Implements hook_theme().


modules/image/, line 454
Implement an image field, based on the file module's file field.


function theme_image_widget($variables) {
  $element = $variables['element'];
  $output = '';
  $output .= '<div class="image-widget form-managed-file clearfix">';

  if (isset($element['preview'])) {
    $output .= '<div class="image-preview">';
    $output .= drupal_render($element['preview']);
    $output .= '</div>';

  $output .= '<div class="image-widget-data">';
  if ($element['fid']['#value'] != 0) {
    $element['filename']['#markup'] .= ' <span class="file-size">(' . format_size($element['#file']->filesize) . ')</span> ';
  $output .= drupal_render_children($element);
  $output .= '</div>';
  $output .= '</div>';

  return $output;



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.