Jump to content

Workflows > Inputs > Script Filter > JSON Format -- icon -- "type": "filetype" not working

Recommended Posts

Alfred 5.1 [2134]
macOS 13.3.1 (a) (22E772610a)


I created a workflow with a ScriptFilter as input. The script in said ScriptFilter outputs a json like this:

    "items": [
            "arg": "redacted",
            "autocomplete": "redacted",
            "icon": {
                "path": "./media/vpn-connected.png",
                "type": "filetype"
            "subtitle": "VPN:com.tunnelblick.macos (Connected)",
            "title": "redacted"

This output is formatted according to this article: alfredapp.com/help. All items are listed correctly but the icons don't show up.


Solution: Despite the documentation it will work fine when "filetype" in

"type": "filetype"

is replaced by anything. For example "png", "" or "file" will work.


In contrast

"type": "fileicon"

works exactly as advertised in the documentation.


I guess this is not really a bug in Alfred 5 but a wrong/ unclear help-article.

Link to comment

The documentation is correct, but I’ll have a thought about how to make it clearer. If you use "type": "filetype", then path must list a file type; a UTI like public.png. If you want the image itself to be displayed, omit type entirely (as per the top example in that section). Your alternatives worked because Alfred ignored the unexpected type.


Edited by vitor
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...