Custom code for thumbnails extraction + updated ranking