mastodon/app/views/api/v1/accounts/show.rabl
Eugen 12f72e1740 When avatar/header are GIF, generate static versions (#1428)
* When avatar/header are GIF, generate static versions.
Account API returns "avatar"/"avatar_static", "header"/"header_static"
Static version is the same as original for other cases
Web UI de-animates avatars in toots, lists of users

Fix #441, fix #596, prerequisite for #1064

* Fix JS test

* Add rake task to generate static avatars/headers from GIF ones, add test
2017-04-11 00:38:58 +02:00

12 lines
629 B
Ruby

object @account
attributes :id, :username, :acct, :display_name, :locked, :created_at
node(:note) { |account| Formatter.instance.simplified_format(account) }
node(:url) { |account| TagManager.instance.url_for(account) }
node(:avatar) { |account| full_asset_url(account.avatar_original_url) }
node(:avatar_static) { |account| full_asset_url(account.avatar_static_url) }
node(:header) { |account| full_asset_url(account.header_original_url) }
node(:header_static) { |account| full_asset_url(account.header_static_url) }
attributes :followers_count, :following_count, :statuses_count