Fixed upload of Image/Document sub-classes. Added PATH_mode.format option to img_tag_{mode}.