In DAMP 2.0 if we can't preview an image we use the media type icon. In this case I believe the file media type has a folder icon so that's why it's displayed. You could change that icon, or create a new media type and give that the proper icon.
Super. I could change that. I can see that you use word icons for doc files so you must do an additional compare I guess? Ideally I would like to associate the dot and dotx files with word too?.
The word icon isn't used anymore. That was used in DAMP 1.0, but it only worked for a couple of extensions so in DAMP 2.0 we changed it so it uses the media type icon. This way custom media types are also better supported.
Sorry what I said is wrong :). Just looked at the source and it only uses the media type icon if there is no umbracoFile property on the media item (for example a folder) or if the icon is not found. Here is a quick copy paste of what extensions are supported:
if (DigibizConstants.IMAGETYPES.IndexOf("," + extLow + ",") < 0)
{
switch (extLow)
{
case "docx":
case "doc":
return umbPath + "/plugins/DigibizAdvancedMediaPicker/Doc_icon.png";
case "xlsx":
case "xls":
case "csv":
return umbPath + "/plugins/DigibizAdvancedMediaPicker/Excel_icon.png";
case "pptx":
case "ppsx":
case "ppt":
case "pps":
return umbPath + "/plugins/DigibizAdvancedMediaPicker/Power_icon.png";
case "pdf":
return umbPath + "/plugins/DigibizAdvancedMediaPicker/Pdf_icon.png";
case "txt":
return umbPath + "/plugins/DigibizAdvancedMediaPicker/Text_icon.png";
case "aac":
case "aif":
case "iff":
case "m3u":
case "mid":
case "mp3":
case "mpa":
case "ra":
case "wav":
case "wma":
return umbPath + "/plugins/DigibizAdvancedMediaPicker/Audio_icon.png";
case "3g2":
case "3gp":
case "asf":
case "asx":
case "avi":
case "flv":
case "mov":
case "mp4":
case "mpg":
case "rm":
case "swf":
case "vob":
case "wmv":
return umbPath + "/plugins/DigibizAdvancedMediaPicker/Video_icon.png";
case "7z":
case "deb":
case "gz":
case "pkg":
case "rar":
case "sit":
case "sitx":
case "zip":
case "zipx":
return umbPath + "/plugins/DigibizAdvancedMediaPicker/Zip_icon.png";
default:
MediaType mt = MediaType.GetByAlias(mediaType);
return umbPath + "/images/thumbnails/" + mt.Thumbnail;
}
}
It first looks if the we can preview the image. If we can't we show a default icon. You can find that code in the DigibizMediaHelper.cs file. You can just change it so it supports your extensions as well.
Icons in damp media browser
Hi all,
For some reason dot and dotx files are displayed with folder icons in the media browser. In the media section they are created as files.
Is it configurable or otherwise changeable?
best
Jesper
In DAMP 2.0 if we can't preview an image we use the media type icon. In this case I believe the file media type has a folder icon so that's why it's displayed. You could change that icon, or create a new media type and give that the proper icon.
Jeroen
Hi Jeroen,
Super. I could change that. I can see that you use word icons for doc files so you must do an additional compare I guess? Ideally I would like to associate the dot and dotx files with word too?.
best
Jesper
The word icon isn't used anymore. That was used in DAMP 1.0, but it only worked for a couple of extensions so in DAMP 2.0 we changed it so it uses the media type icon. This way custom media types are also better supported.
Jeroen
Hi Jeroen,
Sorry to bother you one more time - but I'm seeing Word icons all over :-) Just not on dot and dotx files :-)
A few screenshots:
How media type "File" is defined (no word icons there):
How media browser looks
Quite a lot of word icons. Where do they come from. No 2 file is a dot file ..
And in content
Thats a lot of word icons :-)

I'm using Damp 2.0
Best
Jesper
Sorry what I said is wrong :). Just looked at the source and it only uses the media type icon if there is no umbracoFile property on the media item (for example a folder) or if the icon is not found. Here is a quick copy paste of what extensions are supported:
It first looks if the we can preview the image. If we can't we show a default icon. You can find that code in the DigibizMediaHelper.cs file. You can just change it so it supports your extensions as well.
Jeroen
Hey Jeroen,
Faaantastic. Thanks. I'll give it a go! Next DAMP might have this in a config file :-)
best
Jesper
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.