{% set url = url_for('display_file', filename=path.name) %} {% if entity.class_.view == 'file' %} {% if path.suffix.lower() in config.DISPLAY_FILE_EXTENSIONS %} image {% else %} {{ _('no preview available')|uc_first }} {% endif %} {% else %} image {% endif %}