Python3 compatibility

Fix images plugin