Animated Avatar Plugin

Summary: This plugin adds the ability for users to upload gif avatars which will animate on hover or selection in posts, user cards, and profile pages.

:link: GitHub: GitHub - discourse/discourse-animated-avatars: A plugin to add gif avatars in Discourse
:arrow_right: Install: Follow the plugin installation guide.

Features

Pauses animation when not focused. Within topics, animation will pause when post is not hovered or selected.

Respects prefers-reduced-motion in the browser’s accessibility options: Animations will be disabled entirely.

Configuration

This plugin has an optional dependency on gifsicle. This is used to resize uploaded gif images to fit a square avatar, which helps to wrangle aspect ratios as well as normalize any differences between the static and animated images’ sizes for a smoother swap. The plugin will still function without it, but any non-square avatars may appear stretched when shown.

To enable, you will add a call to the install script in your app.yml. A example of what the after_code hook will look like is the following:

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/discourse-animated-avatars.git
    - exec:
        cd: $home/plugins/discourse-animated-avatars
        raise_on_fail: false
        cmd:
          - $home/plugins/discourse-animated-avatars/scripts/install.sh

CHANGELOG

TODO

  • Add a site setting that limits who can upload animated avatars by trust level
9 Likes