don't connect to db unless it's queried
redid thumbnailing as a service in pimple