Add support for custom classes on images.