load(ressourcepath) not working for images and audiofiles in HTML5 export

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

Hi, I’m working on a game for the github gameoff challenge and I started to experiment with uploading my game to itch.io.
The current sourcecode is here: GitHub - pastra98/DriveMeInsane

Problem
Once the project is exported to html5, stuff like TextureRect.texture = load(ressourcepath) does not work anymore on itch. Same with audiostreams.

My understanding & stuff I tried
I understand this has to do with the generated PCK file being a virtual filepath, I saw that on this github answer. Reduz recommends to use load() (like I currently do?) and import the file as an image. I tried reimporting the image by reimporting as Image instead of Texture in the import panel of the .png files. After reimporting, the images don’t show at all.

I also tried ProjectSettings.globalize_path(filepath) to no avail.

Context
I have implemented a system where everything about game characters is defined in a cfg file (e.g. /src/passengers/ressources/bob/bob.cfg). Then the passenger class is initialized with the correct name and loads the information. It stores an imagepath in the ressource format e.g. res://passengers/ressources/merlin/merlin_angry.png.

:bust_in_silhouette: Reply From: redsharktooth22

My bad, the filepaths had the wrong capitalization (I used a string format with the characters name which is in caps - unlike the actual file which is lowercase). This also caused troubles with the normal compiled file. load(respath) now works again.

Thanks Nisovin from discord!