Refactor content image discovery