MDL-61215 core_badges: use the new optimised_image filetype group
authorSara Arjona <sara@moodle.com>
Tue, 11 Aug 2020 12:38:37 +0000 (14:38 +0200)
committerSara Arjona <sara@moodle.com>
Fri, 14 Aug 2020 15:06:23 +0000 (17:06 +0200)
For the badge picture (instead of the web_image which includes
SVG files).

badges/classes/form/badge.php

index 523403b..6626b58 100644 (file)
@@ -70,7 +70,7 @@ class badge extends moodleform {
         $mform->addRule('description', null, 'required');
 
         $str = $action == 'new' ? get_string('badgeimage', 'badges') : get_string('newimage', 'badges');
-        $imageoptions = array('maxbytes' => 262144, 'accepted_types' => array('web_image'));
+        $imageoptions = array('maxbytes' => 262144, 'accepted_types' => array('optimised_image'));
         $mform->addElement('filepicker', 'image', $str, null, $imageoptions);
 
         if ($action == 'new') {