How do you create a circular image and save to a database?

I tested as is the example, but it shows this error.

does it work with companion?