Exhibit 23.1
Consent of Independent Registered Public Accounting Firm
We consent to the incorporation by reference in the Registration Statement (Form S-8) pertaining to the 2010 Stock Option and Incentive Plan of UniFirst Corporation of our reports dated October 27, 2010, with respect to the consolidated financial statements and schedules of UniFirst Corporation and the effectiveness of internal controls over financial reporting, included in its Annual Report (Form 10-K) for the year ended August 28, 2010 filed with the Securities and Exchange Commission.
/s/ Ernst & Young LLC
Boston, Massachusetts
October 24, 2011