Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-72443

SVG files do not support the preview mode

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_311_STABLE
    • MOODLE_311_STABLE
    • Hide
      1. Create a course
      2. Add a folder activity
      3. Upload caution.svg (a yellow triangle with exclamation mark) & cat.jpg (a cat) to Content > Files
      4. Confirm file picker shows appropriate previews of each (i.e. actual image content)
      5. Press Save and display
      6. Confirm folder listing shows appropriate previews of each
      7. Add a label to the course
      8. Embed same two images in the label
      9. Press the Manage files button in the Atto editor
      10. Confirm file listing shows appropriate previews of each
      Show
      Create a course Add a folder activity Upload caution.svg (a yellow triangle with exclamation mark) & cat.jpg (a cat) to Content > Files Confirm file picker shows appropriate previews of each (i.e. actual image content) Press Save and display Confirm folder listing shows appropriate previews of each Add a label to the course Embed same two images in the label Press the Manage files button in the Atto editor Confirm file listing shows appropriate previews of each
    • HQ Team International CI H2-21, HQ Team International CIH2-212

      As discovered in MDL-55243:

      ... SVG files do not seem to support the "preview" parameter of pluginfile.php.

      While pluginfile.php/42/local_foo/bar/1234/something.svg is served OK, pluginfile.php/42/local_foo/bar/1234/something.svg?preview=thumb is not and a general icon representing the mime type is displayed. This can lead to unexpected behaviour such as the one discussed at https://moodle.org/mod/forum/discuss.php?d=425244 If we made SVG to act as normal images, we need to make sure they can be served in various preview sizes like bitmap images.

        1. cat.jpg
          cat.jpg
          14 kB
        2. caution.svg
          0.4 kB
        3. MDL-72442_Test Passed.png
          MDL-72442_Test Passed.png
          107 kB

            pholden Paul Holden
            mudrd8mz David Mudrák (@mudrd8mz)
            Dongsheng Cai Dongsheng Cai
            Jun Pataleta Jun Pataleta
            Gladys Basiana Gladys Basiana
            Votes:
            1 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 55 minutes
                1h 55m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.