Skip to content

How can I make an animated GIF play when using a Slack file in an Image Block? #2687

Description

@take2moto

Package

I don't know

Question

Description

An animated GIF referenced through a Slack File object behaves differently depending on where the image element is used.

  • A top-level Image Block displays a static PNG thumbnail on Slack Web.
  • The same Slack file used as a Section accessory displays the animated GIF correctly.
  • On the Slack mobile app, the GIF animates in both cases.

Is there a way to make an animated GIF play when specifying a Slack file in an Image Block?

SDK Version

@slack/bolt: 4.7.0, @slack/web-api: 7.15.1, @slack/types: 2.20.1

Node.js Version

v22.23.2

Additional Context

{
  "blocks": [
    {
        "type": "image",
        "slack_file": {
        "id": "F0123456"
        },
        "alt_text": "Animated GIF not working"
    },
    {
        "type": "image",
        "image_url": "https://files.slack.com/files-xxx/T0123456-F0123456/xxx.gif"
        "alt_text": "Animated GIF not working"
    },
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "*Animated GIF test*"
      },
      "accessory": {
        "type": "image",
        "slack_file": {
          "id": "F0123456"
        },
        "alt_text": "Animated GIF working"
      }
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions