line-bot-sdk-python icon indicating copy to clipboard operation
line-bot-sdk-python copied to clipboard

How do I send flex message that include animated image by bot?

Open z20030818 opened this issue 3 years ago • 0 comments

This is my code.

flex_contents = {
  "type": "bubble",
  "size": "kilo",
  "body": {
    "type": "box",
    "layout": "vertical",
    "contents": [
      {
        "type": "image",
        "url": "https://i.ibb.co/RS03zgJ/ezgif-com-gif-maker-1.png",
        "size": "full",
        "aspectMode": "cover",
        "animated": True
      }
    ],
    "paddingAll": "0px"
  }
}
line_bot_api.reply_message(event.reply_token, FlexSendMessage(alt_text='test', contents=flex_contents))

My image is apng and its lower than 300kb, I use flex message simulator to send the sample and the image in sample has animated. But when I put the code into the bot, the image in flex message has no animated. I don't know where am I wrong.

z20030818 avatar May 11 '22 10:05 z20030818