Is there any local application to resize an image to multiple sizes?

Something similar that Wordpress does for images, but for static websites in order to set with srcset. Example:

  • Input:
    Image1, Image2
  • Output:
    Image1x350px ,Image1x768px , Image1x1024px, Image1x2048px, Image2x350px, Image2x768px, Image2x1024px, Image2x2048px

Ok a possible solution/workaround would be to have a local server with a wordpress installation to resize images.