I'm unfamiliar with renpyhotspot, so perhaps this isn't the answer you're looking for...
But for the most part, you don't need to import images into RenPy.
If you use
scene this_is_my_background_image_001
, it will load the first "this_is_my_background_image_001" image it finds in the
images
folder. That would usually be a
.png
,
.webp
or
.jpg
image.
show this_is_my_background_image_001
works equally well.
You don't need a corresponding
image
statement, RenPy will figure that out for you.
In fact, the only time you actually need
image
statements is if you're coding images how RenPy is intended to work, with the image identifier being more like
image bg this is my background image 001
and you've decided NOT to name the images in the
images
folder the same way, including spaces.
Most common is something like:
image bg home livingroom daytime 001 = bg_home_livingroom_daytime_001
-or-
image eileen casual happy = eileen_casual_happy
If what you're trying to do is that... then RenPy can already do most of the heavy lifting for you. No specific import required, as long as you can follow your own file naming standard and do so consistently.
Have a look at
You must be registered to see the links
and here's how you might use it.
Python:
#gui.rpy
#Define all images
define config.automatic_images = [' ','_','-','/']
define config.automatic_images_strip = ['images']
There's a note to say it only searches for
.png
and
.jpg
. I haven't used it personally with
.webp
files, so I couldn't tell you if that note is still accurate or if it's out of date.