Image compression and youtube thumnails with workers

how to Generate Youtube thumbnails with Workers and Cloudflare Image Resizing? what it does just image compression or anything else ?