Plugin logo does not accept .svg files

Plugin logo does not accept .svg files

by Joseph Rézeau -
Number of replies: 3
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

In the course of submitting a new plugin (Random select answers) I have encountered the following issue.

In the Edit this plugin form, a Logo file can be submitted. The Logo field specifies: "Accepted file types: Image files used on the web .gif .jpe .jpeg .jpg .png .svg .svgz"

However, the .svg files are not accepted. The only question type that tried to insert a .svg logo file is Record audio question type, and it does not work as can be seen on its page.

By the way, out of the approx. 80 question types in the plugin directory, only 28 feature a logo there.thoughtful

Can someone please amend the Logo field description with the correct types of accepted image files? Thanks.

Average of ratings:Useful (1)
In reply to Joseph Rézeau

Re: Plugin logo does not accept .svg files

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Until very recently, there was a bug with whether SVG images were identified as images. That got fixed in MDL-55243. I guess moodle.org is not yet using 3.10.6, but I expect it will be soon.
Average of ratings:Useful (3)
In reply to Tim Hunt

Re: Plugin logo does not accept .svg files

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Moodle.org is currently using 3.11.1, which includes the fix for MDL-55243. Does anyone know whether .svg files have ever worked in the Moodle plugins directory?

In reply to Helen Foster

Re: Plugin logo does not accept .svg files

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

I just checked and even with MDL-72242 deployed (which fixes the regression with SVG files introduced by MDL-55243), SVG files do not work as icons.

The reason seems to be that SVG files do not support the ?preview=thumb parameter submitted to pluginfile.php. Which I think is a newly found core bug.

Average of ratings:Useful (5)