diff --git a/mod/resource/type/file/resource.class.php b/mod/resource/type/file/resource.class.php index a00c6f605b7..94d885ae724 100644 --- a/mod/resource/type/file/resource.class.php +++ b/mod/resource/type/file/resource.class.php @@ -216,6 +216,7 @@ function display() { $formatoptions->noclean = true; if ($resource->options != "frame") { + if (in_array($mimetype, array('image/gif','image/jpeg','image/png'))) { // It's an image $resourcetype = "image"; $embedded = true; @@ -234,7 +235,7 @@ function display() { } else if ($mimetype == "text/html") { // It's a web page $resourcetype = "html"; - } + } } $isteamspeak = (stripos($resource->reference, 'teamspeak://') === 0); @@ -440,26 +441,26 @@ function display() { } else if ($resourcetype == "mediaplayer") { echo '