From d12ac535125eab9fc2ff643c778b60b526b2e53a Mon Sep 17 00:00:00 2001 From: Adam Olley Date: Tue, 3 Oct 2017 10:16:18 +1030 Subject: [PATCH] MDL-60320 icons: Use PNG icons as the preview thumbnails Without this change, Moodle fails to provide any data when requesting a thumbnail for a non-image file as its looking to provide a SVG file that doesn't exist. --- lib/filelib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/filelib.php b/lib/filelib.php index 05cac2d66dc..86b46e29086 100644 --- a/lib/filelib.php +++ b/lib/filelib.php @@ -2425,7 +2425,7 @@ function send_stored_file($stored_file, $lifetime=null, $filter=0, $forcedownloa $size = 256; } $fileicon = file_file_icon($stored_file, $size); - send_file($CFG->dirroot.'/pix/'.$fileicon.'.svg', basename($fileicon).'.svg'); + send_file($CFG->dirroot.'/pix/'.$fileicon.'.png', basename($fileicon).'.png'); } else { // preview images have fixed cache lifetime and they ignore forced download // (they are generated by GD and therefore they are considered reasonably safe).