Fix image upload when UPLOAD_PATH_OBSCURIFY setting is enabled (attachment plugin)