Adds class to thumbnail and image size.