code: public function format($image, array $properties)
      {
          if (key_exists('format', $properties)) {
              $image->encode($properties['format'], $properties['quality']);
          }
          
          if (key_exists('width', $properties)) {
              $image->resize($properties['width'], $properties['height'], function ($constraint) {
                  $constraint->aspectRatio();
              });
          }
          
          return $image;
      }
docs: Format image (format, resize, etc)
  
  @return void