I have a web part that displays documents and the icon based on their extension (for example Word document displays Word logo based on .docx). I am building a url to display the image
extension = "docx"
var iconLocation = hostUrl + "/_layouts/15/image/ic" + extension + ".png";
I have found through researching this topic that txt extensions need to end with .gif instead of .png. Is there a way to know for sure which icons are supported? I ran into an issue where displaying .png files didn't show a valid image but I am unable to find some sort of documentation that would tell me which files will be handled and how (.png or .gif ending, possible others?)