This question: Locating TMS tile z/x/y where y>2^z describes a similar situation. There, mapproxy is used to serve TMS tiles using a WMS endpoint. Instead of empty tiles, the tiles served are not the expected webmercator tiles. Maybe a similar situation is at play here: perhaps the above links (such as http://localhost:8080/tms/NPI-Svalbard-ortofoto/webmercator/18/142454/36289.png or http://localhost:8080/tms/NPI-Svalbard-ortofoto/webmercator/12/2222/567.png) are not returning webmercator tiles! If they aren't webmercator tiles, it could be that 18/142454/36289
and 12/2222/567
both point to areas not imaged (such as seas), which could explain why the tiles returned are empty.