Add optimization for generated thumbs.