Animated Avatar

Does this work with profile banners?

Something with the install.sh install script breaks the rebuild of Discourse, see here.

was gonna install this plugin but seeing this comment changed my mind lol

Still the case. Comment the install.sh part, rebuild. Uncomment it, rebuild again. That works. Strange.

Is the install still bugging?

No, not for me.

Did you try to install it again without having to comment it?

I rebuild Discourse a lot.

I’m not sure what the problem was some months ago. Maybe this was also related to the GeoIP download which then was changed to local files.

1 Like

I’m not sure what that issue was myself honestly, that script doesn’t have anything to do with the reported error.

1 Like

Hello, I am running into a fatal error with this plugin on the latest Discourse version (v2026.8.0-latest.1).

When a user tries to set or update a profile picture, the frontend returns a generic 422 (Unprocessable Content) error and Uppy logs a network warning.

Checking the Sidekiq/Rails logs reveals that the plugin is crashing the UploadCreator pipeline because it is looking for a resize_animated key that seems to be missing from the current image optimization hash.

Here is the backtrace from /logs:

Job exception: key not found: "resize_animated"

/var/www/discourse/app/models/optimized_image.rb:336:in 'Hash#fetch'
/var/www/discourse/app/models/optimized_image.rb:336:in 'OptimizedImage.optimize'
/var/www/discourse/plugins/discourse-animated-avatars/lib/discourse_animated_avatars/optimized_image_extension.rb:9:in 'DiscourseAnimatedAvatars::OptimizedImageExtension::ClassMethods#resize_animated'
/var/www/discourse/plugins/discourse-animated-avatars/lib/discourse_animated_avatars/upload_creator_gifsicle_extension.rb:18:in 'DiscourseAnimatedAvatars::UploadCreatorGifsicleExtension#crop!'
/var/www/discourse/lib/upload_creator.rb:115:in 'block in UploadCreator#create_for'

Let me know if you need any other logs!

Installed and tried it with GIF and WebP images (200 pixels or less), so they should not be resized, but I get key not found: "resize_animated" on every try and I can’t get it working.

The plugin was installed as the guide describes. I have followed the required post_exec guidelines.

1 Like

Thank you for the bug reports! The bug only affects v2026.8 and later. I just pushed out the fix, so you can just update now.

3 Likes

Thanks for the quick fix on the resize_animated key error. That part is resolved and I’ve updated to 29784ee (Discourse v2026.9.0-latest). However, I’m now hitting a new, different fatal error in the same code path when setting/updating a profile picture.

I think the --crop argument is malformed. Gifsicle expects --crop x,y+width+height (or x,y-x2,y2), but this only has 0,49+399 the x,y pair plus a single +399, with the second +height component missing entirely.

app.js:367 ℹ️ Discourse v2026.9.0-latest — https://github.com/discourse/discourse/commits/ed9f07d9f5 — Ember v6.10.1
uppy-upload.js:503  POST https://btt.community/uploads.json?client_id=f57abab8b5c64413a953f6c839424130 422 (Unprocessable Content)
(anonymous) @ fetcher.js:83
await in (anonymous)
_ @ fetcher.js:17
(anonymous) @ fetcher.js:86
(anonymous) @ index.js:81
(anonymous) @ index.js:227
(anonymous) @ TaskQueue.js:45
#i @ TaskQueue.js:92
add @ TaskQueue.js:73
#uploadLocalFile @ index.js:218
(anonymous) @ index.js:316
#uploadFiles @ index.js:297
(anonymous) @ index.js:345
#runUpload @ Uppy.js:1413
await in #runUpload
upload @ Uppy.js:1521
(anonymous) @ Uppy.js:523
setTimeout
#f @ Uppy.js:521
addFiles @ Uppy.js:672
addFiles @ uppy-upload.js:503
_run @ index.js:804
_join @ index.js:783
join @ index.js:605
join @ index.js:152
(anonymous) @ index.js:250
(anonymous) @ uploads.js:411
n @ uploads.js:410
uppy-upload.js:503 [Uppy] [05:34:13] This looks like a network error, the endpoint might be blocked by an internet provider or a firewall.
(anonymous) @ loggers.js:7
log @ Uppy.js:1277
(anonymous) @ Uppy.js:970
r @ index.js:131
(anonymous) @ index.js:33
emit @ Uppy.js:110
(anonymous) @ index.js:134
await in (anonymous)
(anonymous) @ index.js:227
(anonymous) @ TaskQueue.js:45
#i @ TaskQueue.js:92
add @ TaskQueue.js:73
#uploadLocalFile @ index.js:218
(anonymous) @ index.js:316
#uploadFiles @ index.js:297
(anonymous) @ index.js:345
#runUpload @ Uppy.js:1413
await in #runUpload
upload @ Uppy.js:1521
(anonymous) @ Uppy.js:523
setTimeout
#f @ Uppy.js:521
addFiles @ Uppy.js:672
addFiles @ uppy-upload.js:503
_run @ index.js:804
_join @ index.js:783
join @ index.js:605
join @ index.js:152
(anonymous) @ index.js:250
(anonymous) @ uploads.js:411
n @ uploads.js:410

2 Likes

Thanks for the fast response on this! I tried again with an animated webp image and I saw this output:

gifsicle --colors=256 --crop 0,0+200 --resize-fit 288x288 --optimize=3 --output /tmp/RackMultipartID.webp /tmp/RackMultipartID.webp

But the image is still png. Am I missing something? I hard refreshed the browser just in case, but the unanimated image persists.

1 Like

I can’t change my profile picture at all. I already have a gif profile picture and i tried to replace it with a png profile picture and its giving me the pop up and the error on my previous message and not changing.

I just mention that I am humbly available to test any updates this plugin may need, so it can be used comprehensively again.

You can contact me through whatever means you find available; I have wide availability and can adjust my schedule/time.

Looks like my fix revealed a hidden bug. I’ve updated the repo with another fix (and more tests). Discourse versions v2026.8 and later are affected.

The fatal error and blocked upload is a bug, and has been fixed. However, animated WebP images are not supported yet. The plugin was originally designed for GIF, and other image formats remain static. Support for animated WebP (and APNG) might be added in the future.


1 Like

Thanks for the fix! I just tested it on my instance (updated to 012466a) and it’s working. Tried both a .png and a .gif profile picture, no errors on either. Looks good on my end.

4 Likes

I also thank you for the update and confirm that it works perfectly in gif format.

1 Like