Fix image messages

In the "new" API the list of message segments is optional, so we need to
handle it being None for image messages.