Image manipulation, picture located under "res://" can't be loaded when the project is exported

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By gp1


the issue in question is that I have a picture under “res://” that has to be cut into multiple pieces.

Please consider the following partial code,

var path = "res://Images/potd-squirrels.png"
main_image =;

and in a loop,

texture =

piece_image =;
piece_image = main_image.get_rect(rect)


the challenge is that the “Image.load” doesn’t know where “res://” is when exported.

So, how do I find the picture when exported, what are the best practises for these kind of things?

Thank you so much for your time.

Make sure to double-check the path’s casing: Windows has a case-insensitive filesystem, but most other platforms have case-sensitive filesystems. If the actual path is res://images/potd-squirrels.png, it won’t match on other platforms.

Calinou | 2019-02-01 09:26

Thank you for your time!

gp1 | 2019-02-03 14:23