How to install PHP GD Library with Freetype | JPEG | libJPEG | XPM | WebP Support enabled on Azure App / Debian
Vignesh Sivakumar
Cloud Architect | Transforming Businesses with Cloud-Native Solutions | GCP Expert | Migration, Automation, DevOps, MLOps & GenAI
Navigate to Menu and Click on the App Services
Open /Create the app that you want to install the GD Library and click on the Configuration Tab
Navigate to the General Settings Tab on the top menu
In the Startup Command, type the Copy & Paste the line below as shown in the image.
/home/startup.sh
Next, scroll down on the left menu and navigate to the SSH under the Deployment Tools section, and click on the GO
Note: Any data outside '/home' is not persisted
Create a file (startup.sh) in the home directory.
vi startup.sh
Copy & Paste the below Code
apt-get update apt-get install -y libwebp-dev libjpeg62-turbo-dev libpng-dev libxpm-dev libfreetype6-dev docker-php-ext-configure gd --with-gd --with-webp-dir --with-jpeg-dir --with-png-dir --with-zlib-dir --with-xpm-dir --with-freetype-dir --enable-gd-native-ttf docker-php-ext-install gd apache2ctl -D FOREGROUND
Save and Exit from SSH
Stop and Restart the App from the Overview section.
Wait for 3 - 5 min. Then Azure App will Start and Install the libraries automatically.
Congratulations. Now you have successfully installed the GD Library with Freetype | JPEG | libJPEG | XPM | WebP Support enabled on Azure App.