This image element does not have a href attribute. Thus the RPA error message. But the element has a scr="…" value, so with the @scr attribute the link scraping works.
Test:
{
"Name": "getlink",
"CreationDate": "2020-11-2",
"Commands": [
{
"Command": "open",
"Target": "https://forum.ui.vision/t/how-to-store-href-from-image/6398",
"Value": ""
},
{
"Command": "storeAttribute",
"Target": "xpath=//*[@id=\"post_1\"]/div/div/a/img@src",
"Value": "aa"
},
{
"Command": "echo",
"Target": "aa=${aa}",
"Value": "green"
}
]
}