def _encode_image_to_url(self, image: str | Path) -> str:
        """Encode an image file to a base64 URL string.

        Args:
            image (str | Path): Path to the image file

        Returns:
            str: Base64-encoded image URL string
        """
        image_path = Path(image)
        extension = image_path.suffix
        base64_encoded = self._encode_image_to_base_64(image_path)
        return f"data:image/{extension};base64,{base64_encoded}"
Encode an image file to a base64 URL string.

        Args:
            image (str | Path): Path to the image file

        Returns:
            str: Base64-encoded image URL string
        
src/anomalib/models/image/vlm_ad/backends/chat_gpt.py