Why don't you make it with revert way?
- You have the name of the png.
- Have variable call nameOfImg.
- Load Image from URL with the path is nameOfImg&".png"
- Then you display the nameOfImg in text.
- And the nameOfImg can be random like choose("dog", "cat").