I'd create a passage called for example "Picture":
<<nobr>>
<<if _i == 0>>
<img src= "the URL of your image" width="500" height="300">
<<elseif _i == 1>>
<img src= "the URL of your image" width="500" height="300">
<<elseif _i == 2>>
<img src= "the URL of your image" width="500" height="300">
<<elseif _i == 3>>
<img src= "the URL of your image" width="500" height="300">
<</if>>
<</nobr>>
You'll have to put the proper url in there and adjust height/width as needed. Then you can just do something like this:
Throw in a coin for your chance to win a prize.
<span id="picture"></span>
<<nobr>>
<span id="prize">
<<set $VMachinePrize = random(3)>>
<<for _i to 0; _i lt $prizes.length; _i++>>
<<capture _i>>
<<if $inventory.includes($prizes[_i])>>
<<link "Slot _i">>
<<replace "#nothing">>The Machine beeps at you.<br>"This Item is sold out!"<</replace>>
<</link>>
<<elseif $VMachinePrize != _i>>
<<link "Slot _i">>
<<replace "#prize">>Too bad. Try again tomorrow.<</replace>>
<<replace "#nothing">><</replace>>
<</link>>
<<else>>
<<link "Slot _i">>
<<replace "#prize">>You win a $prizes[_i].<</replace>>
<<replace "#nothing">><</replace>>
<<set $inventory.push($prizes[_i])>>
<<replace "#picture">><<display "Picture">><</replace>>
<</link>>
<</if>>
<</capture>>
<br>
<</for>>
</span>
<</nobr>>
<span id = "nothing"></span>
You can add any <<set>> macros you want to be executed between the approbriate <<link "Slot _i">><</link>>. As for setting $GoldenTicket to 1 - you don't really need that in this setup. If you want to check, whether the player has the golden ticket, you can just do something like:
<<if $inventory.includes("Golden Ticket")>>You have a golden ticket.<</if>>
If you really want to go to another Passage as soon as the player wins, you could instead do it like this:
Throw in a coin for your chance to win a prize.
<span id="picture"></span>
<<nobr>>
<span id="prize">
<<set $VMachinePrize = random(3)>>
<<for _i to 0; _i lt $prizes.length; _i++>>
<<capture _i>>
<<if $inventory.includes($prizes[_i])>>
<<link "Slot">>
<<replace "#nothing">>The Machine beeps at you.<br>"This Item is sold out!"<</replace>>
<</link>>
<<elseif $VMachinePrize != _i>>
<<link "Slot">>
<<replace "#prize">>Too bad. Try again tomorrow.<</replace>>
<<replace "#nothing">><</replace>>
<</link>>
<<else>>
[[Slot|$prizes[_i]][$inventory.push($prizes[_i])]]
<</if>>
@@color: CornflowerBlue; _i@@
<</capture>>
<br>
<</for>>
</span>
<</nobr>>
<span id = "nothing"></span>
This way the Player will ne linked to a passage that has the same name as the item - Winning the Golden Ticket would send the player to a passage called "Golden Ticket".