mirror of
https://github.com/flarum/framework.git
synced 2025-03-10 20:31:24 +08:00

When users have external avatar urls (for instance: in a SSO environment where the avatar is provided by another domain), color thief fails to get the avatar dominant color because the canvas would be tainted. Following the instructions here (https://lokeshdhakar.com/projects/color-thief/ on the "Does it work if the image is hosted on another domain?"), adding an `image.crossOrigin = 'Anonymous';` solves the issue. Tested on my forum which before suffered from a JS error and works fine (without this fix, the canvas remain in the `body` while an script error is thrown by color thief)
Description
Simple forum software for building great communities.
200 MiB
Languages
PHP
60.7%
TypeScript
26%
JavaScript
7.9%
Less
4.4%
Blade
0.8%
Other
0.2%