function TestToolkit::getMimeType
Returns the MIME type of the image file.
Return value
string The MIME type of the image file, or an empty string if the image is invalid.
Overrides ImageToolkitInterface::getMimeType
File
-
core/
modules/ system/ tests/ modules/ image_test/ src/ Plugin/ ImageToolkit/ TestToolkit.php, line 226
Class
- TestToolkit
- Defines a Test toolkit for image manipulation within Drupal.
Namespace
Drupal\image_test\Plugin\ImageToolkitCode
public function getMimeType() {
return $this->getType() ? image_type_to_mime_type($this->getType()) : '';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.