src/Asset/Asset.php
public function setType(string $type): AssetInterface
    {
        $path = $this->file->isExternal() ? $this->getUrl() : $this->getPath();

        $this->file->setType($path, $type);

        return $this;
    }
public function setType(string $type): AssetInterface
    {
        $path = $this->file->isExternal() ? $this->getUrl() : $this->getPath();

        $this->file->setType($path, $type);

        return $this;
    }
public function setType ( string $ type ) : AssetInterface { $ path = $ this -> file -> isExternal ( ) ? $ this -> getUrl ( ) : $ this -> getPath ( ) ; $ this -> file -> setType ( $ path , $ type ) ; return $ this ; }
Set the asset type.
Override the auto-discovered type if any.

@param string $type

@return AssetInterface
Set the asset type . Override the auto - discovered type if any .