Is there a way to apply the Image styles to the Filetype icon? Override the default icons?

I'm trying to create a view of searched files, and want to show images for each file. If they are an image, it will show a thumbnail, a video a preview mode, etc. If they are the generic "Other" filetype, it should just show the Filetype icon. However, instead of having it be 180x180 pixels, I'd like it to be the same size as my other thumbnails (176 x 132).

And when viewing the file attached to the node, I'd like to use the Filetype icon, but with a different size (320x240).

It would be great if we could run the default image icons through the image style filters to get the desired look and feel for a particular view.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chirhotec’s picture

FileSize
101.4 KB

Example image of how my file search looks now:

Devin Carlson’s picture

Status: Active » Fixed

You can customize the large file type icons by overriding theme_media_formatter_large_icon() (found in media/includes/media.theme.inc) in either your theme or custom module.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

P2790’s picture

Component: Media field » Code
Priority: Normal » Minor
Issue summary: View changes
Status: Closed (fixed) » Active

Would it possible to implement this, so that someone without php knowledge could change the filetype icon image style using entityviewmodes?

Devin Carlson’s picture

Version: 7.x-1.2 » 7.x-2.x-dev
Priority: Minor » Normal
Status: Active » Needs review
FileSize
4.58 KB

A patch to allow users to select an image style for the large filetype formatter.

Devin Carlson’s picture

Status: Needs review » Fixed

Tested #5 and committed to Media 7.x-2.x.

  • Devin Carlson committed a2b8ae2 on 7.x-2.x
    Issue #1772496 by Devin Carlson: Image styles for Large Filetype Icon
    
P2790’s picture

Thanks for that Devin, really helpful

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.