Moved toggleImage block