Like Darklinki said, changing the project files during runtime seems... dangerous ?
Most of all, if this is a webapp, modifying the project would modify it for everyone.
I can think of a way, not sure it will work with every image though.
What you need is the content of the image you load. So you have to load the image with an AJAX request, and save the lastData. Then, load the image from URL (AJAX.lastData). Don't put it only in the sprite, save it in one of the sprites variable, so it will be included in the savefile (making it a lot bigger though). On load finished, then Sprite : load image from URL (sprite.myvarible) should then bring back the image.