Config option to disable Imagic use of SVG for Avatars
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
From time to time there are problems generating automatic Avatars. This is mainly due to the combination of PHP modules with specific combination of ImageMagic and Freetype. When depending on a hosting provider, it might not be an option to change the versions of IMagic and Freetype used for a specific PHP version.
Imagic tends to be stable for other image manipulation tasks, but for rendering images from SVGs there tends to be a lot of dependencies to other installed libs and from time to time the result is not as expected.
Suggestion:
Make a config setting to disable automatic Avatar generation using SVG and IMagic. This is easily done in "server/lib/private/Avatar/Avatar.php : gererateAvatarFromSvg" when this function returns null, the avatar generation falls back to using gd.
(My installation currently have this as a workaround).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in server/lib/private/Avatar/Avatar.php at generateAvatarFromSvg and trace how avatar generation falls back to GD when SVG rendering returns null. Review nearby configuration patterns before deciding where the setting belongs. Done means the setting can disable the SVG/ImageMagick path and avatar generation reliably uses GD instead.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100