Data Attributes
HTML5 introduces a new, standard way to store data in your html source that is invisible to the end user. Here is an example:
<li><a href="#" data-id="1">One</a></li>
<li><a href="#" data-id="2">Two</a></li>
<li><a href="#" data-id="3">Three</a></li>
This is setup to link each list item with a record in a database, but you could create your own attribute for the max and min sizes of a cropped image, the username of the uploaded user, anything. It would just be <p data-user="nathan">Nathan Herald</p> and there you go.
It's easy to get to from Javascript and easy to write into the html for both a human and a computer. And it works in IE!
Please, use this now. No more abusing classes and id's to reference things that have nothing to do with the actual information's structure.