refactor image_resources