Generate thumbnails for .jpg and .png