Creates image thumbnails on the fly and caches results for future queries