slidedeckai.helpers.image_search.get_image_from_url#

slidedeckai.helpers.image_search.get_image_from_url(url: str) BytesIO[source]#

Fetches an image from the specified URL and returns it as a BytesIO object.

This function sends a GET request to the provided URL, retrieves the image data, and wraps it in a BytesIO object, which can be used like a file.

Parameters:

url – The URL of the image to be fetched.

Returns:

A BytesIO object containing the image data.

Raises:

requests.exceptions.RequestException – If the request to the URL fails.