class InterventionImageFileConverter implements FileConverter (View source)

File converter powered by the Intervention Image library.

Supports any file conversions that Intervention Image can perform.

Methods

public
bool
supportsConversion(string $fromExtension, string $toExtension, array $options = [])

Checks whether this converter supports a conversion from one file type to another.

public
convert(DBFile $from, string $toExtension, array $options = [])

Converts the given DBFile instance to another file type.

Details

bool supportsConversion(string $fromExtension, string $toExtension, array $options = [])

Checks whether this converter supports a conversion from one file type to another.

Parameters

string $fromExtension

The file extension you want to convert from - e.g. "jpg".

string $toExtension

The file extension you want to convert to - e.g. "webp".

array $options

Any options defined for this converter which should apply to the conversion. Note that if the converter supports this conversion generally but doesn't support these options, this method will return false.

Return Value

bool

DBFile convert(DBFile $from, string $toExtension, array $options = [])

Converts the given DBFile instance to another file type.

Parameters

DBFile $from
string $toExtension

The file extension you want to convert to - e.g. "webp".

array $options

Any options defined for this converter which should apply to the conversion.

Return Value

DBFile

Exceptions

FileConverterException