code: public function preview($width, $height)
      {
          if (!$width || !$height) {
              throw new \Exception('Please, provide both width and height for preview');
          }
          $result = clone $this;
          $result->operations[]['preview'] = array(
              'width' => $width,
              'height' => $height,
          );
          return $result;
      }
docs: Get object with preview parameters.
  Provide both width and height.
  If no width and height are provided exceptions will be thrown!
  
  @param int $width Preview image width.
  @param int $height Preview image height.
  @throws \Exception
  @return File