Bkwld\Croppa\Handler::getContentType PHP Method

getContentType() public method

Symfony kept returning the MIME-type of my testing jpgs as PNGs, so determining it explicitly via looking at the path name.
public getContentType ( string $path ) : string
$path string
return string
    public function getContentType($path)
    {
        switch (pathinfo($path, PATHINFO_EXTENSION)) {
            case 'jpeg':
            case 'jpg':
                return 'image/jpeg';
            case 'gif':
                return 'image/gif';
            case 'png':
                return 'image/png';
        }
    }