file_styles thumbnail image

Created on 19 January 2011, over 14 years ago
Updated 11 June 2025, 2 days ago

The file_styles default image theme function refers to an image in the core files module that does not exist:

function theme_file_styles_styles_default($variables) {
  $file = $variables['object'];
  $path = drupal_get_path('module', 'file');
  $thumbnail = theme('image',
    array(
      'path' => $path . '/images/file-unknown.png', // <-- this really is unknown!
      'alt' => t('Thumbnail for !filename.', array('!filename' => $file->filename)),
      'attributes' => array('width' => 100, 'height' => 75, 'class' => 'file-unknown'),
    )
  );
  return $thumbnail;
}

Ideally this would display different images depending on the file type, and also allow file type images to be run through imagecache so that they fit into a list of files.

πŸ› Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States becw

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9

    Thank you for your contributions to this issue. As Drupal 7 has reached its End of Life and is no longer supported, we are closing this issue. We encourage you to upgrade to a supported version of Drupal.

Production build 0.71.5 2024