Add image metadata to database