powershell 7 (pwsh) as parallel runner

$process = Get-Process -Id $pid
$process.PriorityClass = 'idle'
get-item .\*.jpg | foreach-object -ThrottleLimit NUM_CORES -Parallel { cwebp.exe -metadata exif $_.FullName -o ("OUTPUTPATH" + $_.Name).replace('jpg','webp') }
# if ((Get-Item -Path $b).length -eq 0) { }

PowerShell 7 can be found on Microsoft Store:
https://apps.microsoft.com/store/detail/powershell/9MZ1SNWT0N5D Get-ChildItem -recurse (-filter / -include), and $_.Fullname may be useful.

Note: disable windows defender, explorer thumbnail for higher performance (SystemPropertiesAdvanced).

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "IconsOnly" /t Reg_DWord /d 00000001 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "ShowPreviewHandlers" /t Reg_DWord /d 00000000 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "ShowTypeOverlay" /t Reg_DWord /d 00000000 /f