You are here

public static function Utils::isImage in N1ED - Visual editor as CKEditor plugin with Bootstrap support 7

2 calls to Utils::isImage()
AFile::isImage in vendor/edsdk/file-uploader-server-php/src/lib/file/AFile.php
FileUploaded::checkForErrors in vendor/edsdk/file-uploader-server-php/src/lib/file/FileUploaded.php

File

vendor/edsdk/file-uploader-server-php/src/lib/file/Utils.php, line 96

Class

Utils

Namespace

EdSDK\FileUploaderServer\lib\file

Code

public static function isImage($name) {
  $exts = [
    "gif",
    "jpg",
    "jpeg",
    "png",
  ];
  $ext = Utils::getExt($name);
  for ($i = 0; $i < count($exts); $i++) {
    if ($exts[$i] === strtolower($ext)) {
      return true;
    }
  }
  return false;
}