Add support for .svg and .webp image formats
Chamilo is able to support several image formats (jpg, jpeg, png and gif) which is not bad but a little restricted. Image formats like .svg and .webp are becoming more and more accepted and it would be a good idea to add support for them.
This task is related to #5637, which already implements a tiny support of these image formats.
Implement optional use of SVG icons. Only enabled in test-server mode for now - refs #7359
Implement optional use of SVG icons. Only enabled in test-server mode for now - Remove left-out error logs - refs #7359
Updated by Yannick Warnier about 5 years ago
- Status changed from New to Assigned
- Assignee set to Daniel Barreto
- Estimated time set to 2.00 h
- Complexity changed from Normal to Easy
- SCRUM pts - complexity changed from ? to 3
Look for all places when "jpg" and "png" are on the same line in the code, and you should get a good idea of what to change.
Normally, there's a new function/constant somewhere with a list of all image types that are considered images by Chamilo. Ideally, this task should serve to ensure that we have only one place in the code where this list is available.
Also check that video types include .webm (this should be the exact same process)
Updated by Yannick Warnier almost 5 years ago
- Assignee changed from Daniel Barreto to Alex Aragon
- Target version changed from 1.10.0 to 2.0
- % Done changed from 0 to 30
I added code to test this in Display::return_icon(), but it is only enabled when Chamilo is in test server mode. It works particularly well in the exercise edition, when looking at the question type icons.
I'm moving this to 2.0 because it requires much more work to produce more icons in SVG format.
Alex: necesitamos más iconos en formato SVG para empezar a usar esta funcionalidad, que aparece solamente en modo de servidor de prueba.
Updated by Yannick Warnier over 4 years ago
Added many SVG icons in https://github.com/chamilo/chamilo-lms/commit/1514f2c4a3b7b446961b258b6c3f9befb2809d23 and https://github.com/chamilo/chamilo-lms/commit/bcdb1231954a32207940a876550e01d494b9b3b4
Still missing a lot.
Some SVG icons tend to distort on display.
Icons need a grey version for _na suffix icons (can we do that in SVG through a simple command?)