test API handles image attributes correctly

make sure we create an images array from an image attribute and vice
versa