upgrade classes for images