Fix image upload when IMAGE_PATH_OBSCURIFY setting is enabled