MDL-68107 mod_label: make images dropped onto courses responsive
authorBas Brands <bas@moodle.com>
Mon, 27 Jul 2020 07:45:17 +0000 (09:45 +0200)
committerBas Brands <bas@moodle.com>
Mon, 27 Jul 2020 07:55:43 +0000 (09:55 +0200)
mod/label/lib.php

index 1931f82..3cf3224 100644 (file)
@@ -323,6 +323,7 @@ function label_generate_resized_image(stored_file $file, $maxwidth, $maxheight)
         $attrib['width'] = $maxwidth;
     }
 
+    $attrib['class'] = "img-fluid";
     $img = html_writer::empty_tag('img', $attrib);
     if ($link) {
         return html_writer::link($link, $img);