Added automatic image specified hit, factored out url generation from trial generation