slackapi / slackapi/node-slack-sdk

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

Open
#2,687 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

server-side-issue
Dominant language
TypeScript
Stars
3.4k
Forks
688
Avg merge
15h 31m
Merged PRs (30d)
27

Description

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"
      }
    }
  ]
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file or test is named. Start by reproducing the supplied Image Block and Section accessory cases with the listed Slack SDK versions on Slack Web and mobile, then compare the documented behavior for slack_file and image_url. Done means confirming whether the SDK can affect playback or documenting the platform limitation and supported workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.