Plugin logo does not accept .svg files

Plugin logo does not accept .svg files

Joseph Rézeau -
回帖数:3
Core developers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像 Testers的头像 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.思考

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

平均分:Useful (1)
回复Joseph Rézeau

Re: Plugin logo does not accept .svg files

Tim Hunt -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 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.
回复Tim Hunt

Re: Plugin logo does not accept .svg files

Helen Foster -
Core developers的头像 Documentation writers的头像 Moodle HQ的头像 Particularly helpful Moodlers的头像 Plugin developers的头像 Testers的头像 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?

回复Helen Foster

Re: Plugin logo does not accept .svg files

David Mudrák -
Core developers的头像 Documentation writers的头像 Moodle HQ的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像 Plugins guardians的头像 Testers的头像 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.