This logic can be simplified as well, as you'll need the resourceType for determining the tile description/metadata anyway:

```
var resourceType = entity.resourceType;
if (resourceType === 'content') {
     resourceType = entity.resourceSubType;
}

if (wide && entity['oae:wideImage']) {
    thumbnailUrl = baseUrl + entity['oae:wideImage'];
} else {
    wide = false;
    if (entity.thumbnailUrl) {
        thumbnailUrl = baseUrl + entity.thumbnailUrl;
    } else {
        thumbnailUrl = baseUrl + '/ui/img/icons/' + resourceType + '.png';
    }
}
```