You have to replace them one after the other. Prior to your call to "Load image from...", stop the animation and use "set animation frame" to manually select which frame you are trying to replace. Once every frame is done, you can resume the animation playback and it should be using all your newly loaded images.
Side note : Your sprite needs to already have a two-frame animations (with placeholder images) for it to work.