-
Notifications
You must be signed in to change notification settings - Fork 1
3. Configuration
- PHP 8.3
- ImageMagick with libheif (Optional: for HEIC -> JPEG conversions)
The following example is based on Debian, but can be adapter to other Linux distros.
1. Verify ImageMagick delegates Check if your system’s ImageMagick already has HEIC (and WEBP) support:
magick -version | grep -E '(heic|webp)'If they are already present, then skip to step (5).
2. Remove any existing ImageMagick (optional but recommended)
sudo apt remove imagemagick -y3. Install dependencies We need the libraries ImageMagick will use for HEIC:
sudo apt install -y imagemagick libmagickwand-dev libheif-dev
libheif-dev → HEIC support
libmagickwand-dev → for PHP imagick extension build
Note: To support optimising webp images, also include libwebp-dev
4. Build ImageMagick from source
sudo apt remove imagemagick -y
cd /tmp
wget https://download.imagemagick.org/ImageMagick/download/ImageMagick.tar.gz
tar xvzf ImageMagick.tar.gz
cd ImageMagick-*
./configure --with-heic=yes --with-webp=yes --with-modules --with-quantum-depth=16
make -j$(nproc)
sudo make install
sudo ldconfigThen reinstall PHP Imagick to link to the new ImageMagick:
sudo pecl install imagick
echo "extension=imagick.so" | sudo tee /etc/php/$(php -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')/cli/conf.d/20-imagick.ini
sudo systemctl restart php-fpm5. Install PHP Imagick
sudo apt install -y php-imagickYou can then confirm this has worked using php -i
Before you can start using inachis, you must create your first administrator from the terminal. This can be done using:
php bin/console create:adminYou will then be able to visit the admin interface, and sign in.
You should not hot-link to images on other people's sites, and to deter this, you can enable badges in the post list to warn you if you've mistakenly done so. A future improvement for this will be to white-list CDNs.
To enabled this, in your .env.local add:
WARN_HOTLINKED_IMAGES_ENABLED=1The security.json configuration file can be used to configure different security headers to be sent to browsers such as Content Security Policy.
{
"encryptionKey": "your-key-goes-here",
"csp": {
"enforce": {
},
"report": {
}
}
}