set imagesdir attribute in chapter documents