Swift 5.3 in XCode 12.2 Playgrounds
Place the cursor wherever in the code the #insertLiteral
would have been in earlier versions. Select from the top-menu Editor->Insert Image Literal...
and navigate to the file. Click Open
.
The file is added to a playground Resource folder and will then appear when the playground is run in whichever view it was positioned when selected.
If a file is already in the playground Bundle, e.g. in /Resources, it can be dragged directly to the required position in the code (where it will be represented by an icon).
cf. Apple help docs give details of this and how to place other colour and file literals.