I am using some code base that uses the Python Image Library (PIL) to create and show images to the User, both in ChatGPT and as part of Custom GPTs I am building.
This worked perfectly in ChatGPT (with Advanced data analysis tool) until yesterday. As of today, it stopped visualizing images. Everything else works, it just stopped showing the images in the chat.
Example with Matplotlib
Matplotlib still works correctly (an image is shown; this is just an example code snippet to show the issue):
import matplotlib.pyplot as plt
import numpy as np
# Set the figure size for better visibility
plt.figure(figsize=(8, 6))
# Number of circles
n = 5
# Generate random center points and radii
centers = np.random.rand(n, 2) * 10 # Scale to spread over a 10x10 area
radii = np.random.rand(n) * 2 # Radii between 0 and 2
# Create the circles
for center, radius in zip(centers, radii):
circle = plt.Circle(center, radius, color=np.random.rand(3,), fill=False)
plt.gca().add_patch(circle)
plt.xlim(0, 10)
plt.ylim(0, 10)
plt.gca().set_aspect('equal', adjustable='box')
plt.axis('off') # Turn off the axis for a cleaner look
plt.show()
Example with PIL
The PIL image instead is not shown (example code below).
from PIL import Image, ImageDraw
import random
# Create a blank white image
width, height = 400, 300
image = Image.new("RGB", (width, height), "white")
draw = ImageDraw.Draw(image)
# Number of circles
n = 5
# Generate and draw random circles
for _ in range(n):
# Random center, radius, and color
center = (random.randint(0, width), random.randint(0, height))
radius = random.randint(10, 50)
color = (random.randint(0, 255), random.randint(0, 255), random.randint(0, 255))
# Calculate bounding box for the circle
left_up_point = (center[0] - radius, center[1] - radius)
right_down_point = (center[0] + radius, center[1] + radius)
bounding_box = [left_up_point, right_down_point]
# Draw the circle
draw.ellipse(bounding_box, outline=color, width=2)
# Show the image
image.show()
This is not a huge deal - I can switch the code to using Matplotlib but it’d be good to know if this is temporary or an explicit choice.


