You are here

public function TinyPng::saveTo in TinyPNG 8

Save result to file.

Parameters

string $uri: Destination URI.

Return value

bool|int Size of new file.

Overrides TinyPngInterface::saveTo

File

src/TinyPng.php, line 124

Class

TinyPng
Class TinyPng.

Namespace

Drupal\tinypng

Code

public function saveTo($uri) {
  $path = $this->fileSystem
    ->realpath($uri);
  return $this->tinyfySource
    ->toFile($path);
}