now rendering images conditionally