You are here

private function HtmlAssetInliner::isImage in TMGMT Translator Smartling 8

Checks if provided path is an image

Parameters

$path:

Return value

bool

1 call to HtmlAssetInliner::isImage()
HtmlAssetInliner::imageToDataUri in src/Context/HtmlAssetInliner.php
Converts images from <img> tags to data URIs

File

src/Context/HtmlAssetInliner.php, line 406

Class

HtmlAssetInliner

Namespace

Drupal\tmgmt_smartling\Context

Code

private function isImage($path) {
  list($width) = @getimagesize($path);
  if (isset($width) && $width) {
    return TRUE;
  }
  return FALSE;
}