use relative URI when possible to reduce filename length.