checkPageHasImages.
check if page Content has a img's in it

@param none
@return boolean
12017
private function checkPageHasImages() {

        $html = $this->getPageContent();

        // for newly created page
        if ($html == '') {
            return false;
        }

        $dom = $this->createDOMDocumentFromHTML($html);

        $elements = $dom->getElementsByTagName('img');
        return ($elements->length) ? true : false;

    }
1176191
def extract_imgs_from_page(page)
      return Set[] if page.is_redirect?
      page.doc.search('//img[@src]').reduce(Set[]) do |result, elem|
        u = elem.attributes['src'].content
        result << page.to_absolute(URI.parse(URI.encode(u)))
      end
    end
780220
public function Image($Img = FALSE) {
      if ($Img) {
         if (!is_array($Img))
            $Img = array($Img);

         $CurrentImages = $this->Data('_Images');
         if (!is_array($CurrentImages))
            $this->SetData('_Images', $Img);
         else {
            $Images = array_unique(array_merge($CurrentImages, $Img));
            $this->SetData('_Images', $Images);
         }
      }
      $Images = $this->Data('_Images');
      return is_array($Images) ? $Images : array();
   }
48677
public function checkPageSubjectInContent() {
        if ($this->checkPageSubjectDefined()) {
            if (preg_match('/' . preg_quote($this->owner->SEOPageSubject, '/') . '/i', $this->getPageContent())) {
                return true;
            }
            else {
                return false;
            }
        }
        return false;
    }
1082236
function isImage (path) {
  return new Promise((resolve, reject) => {
    getMimeType(path)
      .then((type) => {
        ;(type.indexOf('image') > -1) ? resolve(true) : resolve(false)
      })
      .catch(err => reject(err))
  })
}
447152
def image_exists(self, image_name, tag='latest'):
        
        code, image = self.image_tags(image_name)
        if code != httplib.OK:
            return False
        tag = tag.lower()
        return any(x.lower() == tag for x in image.tags)
1242392
def is_text_in_page?(content, flag=true)
      if flag
        assert page.has_content?("#{content}"), "Error: #{content} not found page !"
      else
        assert !page.has_content?("#{content}"), "Error: #{content} found in page !"
      end
    end
762242
public function isImage() {
		try {
			if (!function_exists('exif_imagetype') && !function_exists('Jodit\exif_imagetype')) {
				function exif_imagetype($filename) {
					if ((list(, , $type) = getimagesize($filename)) !== false) {
						return $type;
					}

					return false;
				}
			}

			return in_array(exif_imagetype($this->getPath()), [IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG, IMAGETYPE_BMP]);
		} catch (\Exception $e) {
			return false;
		}
	}
1366994
def is_image_loaded(webdriver, webelement):
        '''
        

        '''
        script = (u("return arguments[0].complete && type of arguments[0].naturalWidth != \"undefined\" ") + 
                 u("&& arguments[0].naturalWidth > 0"))
        try:
            return webdriver.execute_script(script, webelement)
        except:
            return False
102278
public boolean mediaIsImage() {
        String contentType = this.getContentType();
        return contentType != null && this.media != null && contentType.startsWith("image") && !contentType.equals("image/gif");
    }
1220657
def assert_image_exists(self, pattern, timeout=20.0, **kwargs):
        
        pattern = self.d.pattern_open(pattern)
        match_kwargs = kwargs.copy()
        match_kwargs.pop('safe', None)
        match_kwargs.update({
            'timeout': timeout,
            'safe': True,
        })
        res = self.d.wait(pattern, **match_kwargs)
        is_success = res is not None
        message = 'assert image exists'
        if res:
            x, y = res.pos
            kwargs['position'] = {'x': x, 'y': y}
            message = 'image exists\npos %s\nconfidence=%.2f\nmethod=%s' % (res.pos, res.confidence, res.method)
        else:
            res = self.d.match(pattern)
            if res is None:
                message = 'Image not found'
            else:
                th = kwargs.get('threshold') or pattern.threshold or self.image_match_threshold
                message = 'Matched: %s\nPosition: %s\nConfidence: %.2f\nThreshold: %.2f' % (
                    res.matched, res.pos, res.confidence, th)

        kwargs['target'] = self._save_screenshot(pattern, name_prefix='target')
        kwargs['screenshot'] = self.last_screenshot
        kwargs.update({
            'action': 'assert_image_exists',
            'message': message,
            'success': is_success,
        })
        self._add_assert(**kwargs)
1107954
public function hasImage(string $name) : bool
    {
        return $this->imageContentAreas->any(function (ImageContentArea $contentArea) use ($name) {
            return $contentArea->image->isValidImage() && $contentArea->name === $name;
        });
    }
444505
def has_cover_image?(check = nil)
    	post = obtain_record(check)
    	!post.blank? && !post.cover_image.blank? ? true : false
    end
1085595
public static boolean isImage(Media media)
    {
        try
        {
            for (final ImageHeaderReader reader : FORMATS)
            {
                if (reader.is(media))
                {
                    return true;
                }
            }
            return false;
        }
        catch (@SuppressWarnings("unused") final LionEngineException exception)
        {
            return false;
        }
    }
584879
public boolean isSingleDataImage()
    {
    	if (this.getScreenField().getConverter() != null)
        	if (this.getScreenField().getConverter().getField() != null)
            	if (this.getScreenField().getConverter().getField().getComponent(1) == null)
    		return true;
    	return false;
    }
859335
function checkIsImage (src, onResult) {
  var request;

  if (src.tagName) {
    onResult(src.tagName === 'IMG');
    return;
  }
  request = new XMLHttpRequest();

  // Try to send HEAD request to check if image first.
  request.open('HEAD', src);
  request.addEventListener('load', function (event) {
    var contentType;
    if (request.status >= 200 && request.status < 300) {
      contentType = request.getResponseHeader('Content-Type');
      if (contentType == null) {
        checkIsImageFallback(src, onResult);
      } else {
        if (contentType.startsWith('image')) {
          onResult(true);
        } else {
          onResult(false);
        }
      }
    } else {
      checkIsImageFallback(src, onResult);
    }
    request.abort();
  });
  request.send();
}
253909
function layerContainsImage (layer, imageUrl) {
  // Check the layer itself.
  if (layer.type === 'image' && layer.imageUrl === imageUrl) {
    return layer;
  }

  // Check the layer's children.
  if (layer.children) {
    for (var i=0, len=layer.children.length; i < len; i++) {
      if (layerContainsImage(layer.children[i], imageUrl)) {
        return layer.children[i];
      }
    }
  }

  return false;
}