Image URL with file extension instead of GUID using GraphQL

What do I need to do in order to get a URL string in this format using GraphQL:

https://cloud.squidex.io/api/assets/my-app/actual-file-name.(png/.jpg/.gif)

instead of:

https://cloud.squidex.io/api/assets/my-app/long-guid-string-goes-here/

In my GraphQL query I use this currently:

        ...
        flatData {
          image {
            id
            url
            metadata
          }
        }
        ...

and url returns this:

https://cloud.squidex.io/api/assets/shiro-dev/long-guid-string-goes-here/

Please advice :slight_smile:

You have to construct it yourself at the moment. You can create a feature request. But slugs are not necessarily unique so I would stick with IDs

Thanks. I went with fetching fileName and concatinating it with url.

1 Like