That’s so at least in Alaska and Washington, and perhaps elsewhere. From Alaska Statutes § 15.58.030:
(c) Each candidate for [President, Vice-President, Senator, Representative, Governor, Lieutenant Governor, State Senator, or State Representative] is allowed one page of space in the [ballot] pamphlet for a photograph and statement….
(f) A candidate’s photograph must be 5″ x 7″ in size and must have been taken within the past five years. The photograph must be limited to the head, neck, and shoulders of the candidate. All photographs shall be printed in black and white….
Rev. Code Wash. Ann. § 29A.32.031 imposes a similar requirement.
UPDATE: As many commenters have pointed out, this requirement is quite constitutional: The state is printing the ballot pamphlet, and it has substantial latitude to decide what to include in it. The exact scope of the latitude is not clear, and viewpoint-based restrictions and some subject-matter restrictions on the contents of the arguments might well be unconstitutional; but the requirement of a relatively current photograph strikes me as quite constitutional. I just thought that it was amusing, not that it was unconstitutional or even advice.