Yes, the “image” refers to Ubuntu Core (nothing of the above would work on a classic setup anyway).
Typical Ubuntu Core installs run from block devices that are not particulary safe from wearing out through writing to (and deleting) the same block on disk all the time (SD cards, EMMC flash disks, SSDs) … which is what swap usage induces.
So enabling swap is an optional task (but would surely be nicer to handle if there was just a core config option you can set).
These aren’t the snapcraft docs, but, yes this would probably be better in Ubuntu Core docs. I don’t know if those exist, if they are current, how “findable” those are, nor how to edit or otherwise update them.
I’ll update this to explicitly say Ubuntu Core though (you could’ve done it as well, as it’s a wiki).
The “docs” category in ths forum is a wiki for all of snaps, snapcraft, snapd and Ubuntu Core, so unless we start fragmenting the docs category into little pieces, i dont think the post is wrong in this place…
Also, since the described procedure isnt really a core option you can set but requires to edit files on a running system i dont think it qualifies for the official documentation either (something like “snap set core swapsize=50M” that performs the steps above in the backend would qualify IMHO, but that is not implemented atm.)