public static function detectImageDriver()
    {
        $extension = mb_strtolower(Craft::$app->getConfig()->getGeneral()->imageDriver);

        if ($extension === 'gd') {
            self::$imageDriver = 'gd';
        } else if ($extension === 'imagick') {
            self::$imageDriver = 'imagick';
        } else { // autodetect
            self::$imageDriver = Craft::$app->images->getIsGd() ? 'gd' : 'imagick';
        }
    }
public static function detectImageDriver()
    {
        $extension = mb_strtolower(Craft::$app->getConfig()->getGeneral()->imageDriver);

        if ($extension === 'gd') {
            self::$imageDriver = 'gd';
        } else if ($extension === 'imagick') {
            self::$imageDriver = 'imagick';
        } else { // autodetect
            self::$imageDriver = Craft::$app->images->getIsGd() ? 'gd' : 'imagick';
        }
    }
public static function detectImageDriver ( ) { $ extension = mb_strtolower ( Craft :: $ app -> getConfig ( ) -> getGeneral ( ) -> imageDriver ) ; if ( $ extension === 'gd' ) { self :: $ imageDriver = 'gd' ; } else if ( $ extension === 'imagick' ) { self :: $ imageDriver = 'imagick' ; } else { // autodetect self :: $ imageDriver = Craft :: $ app -> images -> getIsGd ( ) ? 'gd' : 'imagick' ; } }
Detects which image driver to use
Detects which image driver to use