Python Turtle handles images in two different ways: use Screen.bgpic() to place an image behind the drawing, or register an image with Screen.register_shape() and select it with Turtle.shape() to use it as the turtle’s sprite. The supported formats depend on your Python version, especially for PNG turtle shapes.
Choose how you want to use the image
| Use | API | Result |
|---|---|---|
| Screen background | screen.bgpic(filename) |
The image appears behind the drawing. |
| Turtle sprite | screen.register_shape(...), then turtle.shape(...) |
The image is used as the turtle’s shape. Image shapes do not rotate when the turtle turns, so they do not indicate its heading. |
Both methods are documented in the Python 3.15 turtle reference, but supported image formats differ by Python version for image shapes.
As an Amazon Associate I earn from qualifying purchases.
How do I set a background image in Turtle?
Get the screen and pass the image filename to bgpic():
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →import turtle
screen = turtle.Screen()
screen.bgpic("background.gif")
turtle.done()
The current reference documents PNG, GIF, PGM, and PPM filenames for bgpic(). To remove the background image, call screen.bgpic("nopic"). Calling screen.bgpic() without an argument returns the current background-image filename. turtle.clear() is not the documented way to remove that image.
#1 Best Overall
Keep the image file accessible to the program when it runs; if it is not alongside the script in the working directory, provide an appropriate path in the filename argument.
How do I make an image the turtle shape?
Register the image with the screen before selecting it as the turtle’s shape:
Rank #2
import turtle
screen = turtle.Screen()
screen.register_shape("sprite.png")
pen = turtle.Turtle()
pen.shape("sprite.png")
turtle.done()
You can also give the image a separate shape name, then use that name with shape():
screen.register_shape("sprite", "sprite.gif")
pen.shape("sprite")
The filename must be registered before shape() can select it. The image remains visually unrotated as the turtle turns.
Can Python Turtle use PNG?
Yes, but check your Python version if you want to use a PNG as the turtle shape. The current Python reference lists PNG, GIF, PGM, and PPM image files for backgrounds and image shapes. Its register_shape() entry says PNG, PGM, and PPM support for image shapes was added in Python 3.14. The Python 3.10 reference shows the older GIF-based image-shape behavior. If you are on an earlier release, consult the documentation for that installed version rather than assuming PNG turtle shapes are supported.
Quick Recap
Best Value
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




