Installation
Requirements
- PHP 8.2+
- Laravel 10.x, 11.x, or 12.x
Install via Composer
bash
composer require laratusk/larasvgPublish Configuration
bash
php artisan vendor:publish --tag=larasvg-configThis will create config/svg-converter.php with default settings.
Setup Providers
Run the interactive setup command to detect and install conversion providers:
bash
php artisan larasvg:setupThe command will:
- Detect your operating system (macOS, Ubuntu, Fedora, Arch, Alpine, etc.)
- Check which providers are already installed and show their versions
- Prompt you to select a provider to install
- Install the selected provider using the appropriate package manager
- Suggest the
.envconfiguration to use
LaraSVG — Provider Setup
System: macos (macos)
● Inkscape ··· Inkscape 1.4.3 (0d15f75, 2025-12-25) /opt/homebrew/bin/inkscape
○ Resvg ····· not installed
Which provider would you like to install?
› Inkscape — already installed (Inkscape 1.4.3) (disabled)
Resvg — PNG — fast, lightweight
Skip — I'll install manually laterAlready-installed providers are shown but cannot be selected.
Manual Installation
You can install providers manually using the bundled shell script:
bash
# Show status
./vendor/laratusk/larasvg/bin/install.sh
# Install a specific provider
./vendor/laratusk/larasvg/bin/install.sh resvg
./vendor/laratusk/larasvg/bin/install.sh inkscapeInstalling Resvg
bash
brew install resvgbash
cargo install resvgbash
pacman -S resvgInstalling Inkscape
bash
brew install --cask inkscapebash
sudo apt install inkscapebash
pacman -S inkscape