thumbnails.js: move to lib/server