make can_access_image work in both local and production modes