Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ImageInterface.php

function ImageInterface::convert

Converts an image to the format specified by the extension.

Parameters

string $extension: The extension to convert to (for instance, 'jpeg' or 'png'). Allowed values depend on the current image toolkit.

Return value

bool TRUE on success, FALSE on failure.

See also

\Drupal\Core\ImageToolkit\ImageToolkitInterface::getSupportedExtensions()

1 method overrides ImageInterface::convert()
Image::convert in core/lib/Drupal/Core/Image/Image.php
Converts an image to the format specified by the extension.

File

core/lib/Drupal/Core/Image/ImageInterface.php, line 184

Class

ImageInterface
Provides an interface for image objects.

Namespace

Drupal\Core\Image

Code

public function convert($extension);
RSS feed
Powered by Drupal