Added dynamic class and image attachment