1
{
 "attachments": [
   {
   "type": "divider",
   "color": "#36A64F"
  },
  {
   "type": "image",
   "title": {
    "type": "plain_text",
    "text": "image1",
    "emoji": true
   },
   "title": "XXXXXX",
   "image_url": "https://s3.amazonaws.com/report.png",
   "alt_text": "image1",
   "color": "#36A64F"
  }
 ]
}

I am using s3 bucket to publish an image, and once the image is published, that image will be removed from s3 bucket, the image appears broken in slack once the url becomes invalid

1 Answers1

2

This is not an error, but works as designed.

When you provide an image link, Slack does not copy the image, but only references it (it will cache it for a while though). Just like a normal HTML page.

If you want to preserve the image you need to copy it yourself / upload it to a persistent storage.

Here is another answer that explains how to upload an image to Slack: Can I upload an image as attachment with Slack API?

Erik Kalkoken
  • 30,467
  • 8
  • 79
  • 114