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.