Wednesday, April 10, 2019

Automatically tag images with Sitecore Powershell Extensions

A brief introduction

Last month I had the pleasure of participating in Sitecore Hackathon with two colleagues. As preparation we spent a couple of hours looking around for API's that could be fun to make some sort of integration to, which hopefully would fit into one of the announced categories. We had our eyes on IBM's Watson API, which provides a long range of services such as translation, tone analyzation and visual recognition.

We ended up choosing (and winning, yay!) the Sitecore Powershell Extensions category. We made a module that did image recognition and tone analyzation on command. If you're curious as to what we did, you can check it out our Hackathon 2019 github documentation or the Youtube presentation.

Tagging images

The Hackathon entry was made with ribbon buttons and modals, to show off some flashy functionality and make it easily understandable.
Personally i think the tone analyzation isn't quite mature enough as a service to be incorporated in actual Sitecore solutions (however it may just be me who's bad at reading the results).
But I really like the potential of the image tagging. The possibilities for editors with a large image catalog to search images based on their content could be a great tool. I decided to spend a bit of time automating it, and do a quick write-up on it here. It's almost a pure reuse of the Hackathon module, I just used the events integration point as a trigger instead, and made it write all keywords automatically.