Plugin/slack with several image_url

Hi,
I’m using plugin/slack to send message to a slack channel, and I have to join an image with it. But the problem is that image have to be randomly selected from a list. But I’m a bit stuck because slack plugin doesn’t authorize natively to pass an image list in image_url field.
So I created previously a file *.txt that’s contain only 1 url generated randomly. But I can’t pass it to slack.
Here is the code :

- name: pick random image name
    image: node
    commands:
      - /bin/bash random.sh > image.txt

  - name: slack blame
    image: plugins/slack
    settings:
      webhook: XXXX
      image_url: file:///image.txt
      template: >
       myTemplate

Anyone have a idea ?

Thanks

the image_url field is a string literal. If you set image_url to file:///image.txt it uses the literal string value. If you need some custom logic for randomly choosing images, you might consider forking and remixing the plugin to use the exact behavior you want. Plugins are meant to be forked and modified.

I know that solution to fork plugin still exists.
But I wanted to know if there was a simpler solution that I wouldn’t know allowing me to do that without having to fork the project because I don’t master Go too much
If it isn’t the case indeed I should do it