Ok....
'coursecat_coursebox_content()' in '/course/renderer.php' has:
$contentimages = $contentfiles = '';
foreach ($course->get_course_overviewfiles() as $file) {
$isimage = $file->is_valid_image();
$url = file_encode_url("$CFG->wwwroot/pluginfile.php",
'/'. $file->get_contextid(). '/'. $file->get_component(). '/'.
$file->get_filearea(). $file->get_filepath(). $file->get_filename(), !$isimage);
if ($isimage) {
$contentimages .= html_writer::tag('div',
html_writer::empty_tag('img', array('src' => $url)),
array('class' => 'courseimage'));
} else {
$image = $this->output->pix_icon(file_file_icon($file, 24), $file->get_filename(), 'moodle');
$filename = html_writer::tag('span', $image, array('class' => 'fp-icon')).
html_writer::tag('span', $file->get_filename(), array('class' => 'fp-filename'));
$contentfiles .= html_writer::tag('span',
html_writer::link($url, $filename),
array('class' => 'coursefile fp-filename-icon'));
}
}
where 'is_valid_image' determines if it is an image. So in '/lib/filestorage/stored_file.php' that method is:
/**
* Verifies the file is a valid web image - gif, png and jpeg only.
*
* It should be ok to serve this image from server without any other security workarounds.
*
* @return bool true if file ok
*/
public function is_valid_image() {
$mimetype = $this->get_mimetype();
if (!file_mimetype_in_typegroup($mimetype, 'web_image')) {
return false;
}
if (!$info = $this->get_imageinfo()) {
return false;
}
if ($info['mimetype'] !== $mimetype) {
return false;
}
// ok, GD likes this image
return true;
}
Thus I suspect as Font's can also be svg's then SVG images are not detected at the moment.
There is MDL-55243, so please make a case there.