def resolve_image_from_args_and_env(config, args):
    """
    Resolves the base image based on arguments, environment variables, and config.
    Returns the resolved image string, or None if not found.
    """
    if args and getattr(args, "image", None) and len(args.image.split(":")) > 1:
        return args.image

    image = os.getenv("RAMALAMA_IMAGE")
    if image:
        return tagged_image(image)

    if config.is_set("image"):
        return tagged_image(config["image"])

    return None  # Defer to the next function for more advanced logic

    Resolves the base image based on arguments, environment variables, and config.
    Returns the resolved image string, or None if not found.
    
ramalama/common.py