generic util class to populate flag and event images