Improves performance of thumbnail generation