Reapplying code that was removed during merge conflict and handling case...

... where obj.images only contains 1 image