function ImageToolkitInterface::parseFile

Same name in other branches
  1. 9 core/lib/Drupal/Core/ImageToolkit/ImageToolkitInterface.php \Drupal\Core\ImageToolkit\ImageToolkitInterface::parseFile()
  2. 8.9.x core/lib/Drupal/Core/ImageToolkit/ImageToolkitInterface.php \Drupal\Core\ImageToolkit\ImageToolkitInterface::parseFile()
  3. 10 core/lib/Drupal/Core/ImageToolkit/ImageToolkitInterface.php \Drupal\Core\ImageToolkit\ImageToolkitInterface::parseFile()

Determines if a file contains a valid image.

Drupal supports GIF, JPG and PNG file formats when used with the GD toolkit, and may support others, depending on which toolkits are installed.

Return value

bool TRUE if the file could be found and is an image, FALSE otherwise.

2 methods override ImageToolkitInterface::parseFile()
GDToolkit::parseFile in core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php
TestToolkit::parseFile in core/modules/system/tests/modules/image_test/src/Plugin/ImageToolkit/TestToolkit.php

File

core/lib/Drupal/Core/ImageToolkit/ImageToolkitInterface.php, line 102

Class

ImageToolkitInterface
Defines an interface for image toolkits.

Namespace

Drupal\Core\ImageToolkit

Code

public function parseFile();

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.