Skip to content
Menu
DevSecOps Now!!!
  • About
  • Certifications
  • Contact
  • Courses
  • DevSecOps Consulting
  • DevSecOps Tools
  • Training
  • Tutorials
DevSecOps Now!!!

How to Fix “WebP Format is Not Supported by PHP Installation” in XAMPP/LAMPP (Complete 2026 Guide)

Posted on February 25, 2026

Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

If you are running Laravel, Eventmie, or any application using Intervention Image, and you see this error:

Webp format is not supported by PHP installation

then your PHP installation does not support WebP encoding.

This problem is extremely common on Linux servers using XAMPP or LAMPP, especially with PHP 8.x.

In this complete step-by-step guide, you will learn:

  • Why this error happens
  • How to confirm the real root cause
  • How to safely fix it without breaking your server
  • How to enable WebP support using Imagick
  • How to force Laravel / Intervention to use Imagick instead of GD
  • What NOT to do on production

This tutorial is written specifically for Linux servers using /opt/lampp.


Why This Error Happens

Intervention Image supports two drivers:

  • GD
  • Imagick

When you call:

$image->encode('webp', 90);

Intervention tries to encode the image in WebP format.

If your PHP GD library was compiled without WebP support, you get:

Webp format is not supported by PHP installation

Important:

WebP support in GD is a compile-time feature.
It cannot be enabled via php.ini.


Step 1 – Confirm the Root Cause

Run the following commands:

/opt/lampp/bin/php -m | grep -i gd

If GD appears, check its capabilities:

/opt/lampp/bin/php -r 'print_r(gd_info());'

If you see:

[WebP Support] =>

That means GD does NOT support WebP.

Now confirm Apache is using XAMPP PHP:

/opt/lampp/bin/httpd -M | grep -i php

If you see:

php_module (shared)

Then Apache is using XAMPP’s built-in PHP.

At this point, the issue is confirmed:
GD does not support WebP.


All Possible Solutions

There are three ways to solve this.

  1. Disable WebP encoding in your application (quick fix)
  2. Install Imagick and use it instead of GD (recommended)
  3. Rebuild PHP with WebP support (risky and not recommended)

We will implement Solution 2 because it is the safest long-term fix.


Solution 1 – Quick Fix (Disable WebP Encoding)

If you need uploads to work immediately, change this line in:

eventmie-pro/src/Http/Controllers/Voyager/SettingsController.php

Replace:

$image->encode('webp', 90);

With:

$image->encode('jpg', 90);

Then clear cache:

cd /opt/lampp/htdocs/your-project
/opt/lampp/bin/php artisan config:clear
/opt/lampp/bin/php artisan cache:clear
sudo /opt/lampp/lampp restart

This fixes uploads instantly but removes WebP support.


Solution 2 – Enable WebP Properly Using Imagick (Recommended)

This is the correct professional solution.


Step 2.1 – Install Required System Packages

sudo apt update
sudo apt install -y imagemagick libmagickwand-dev libwebp-dev

Step 2.2 – Install Imagick for XAMPP PHP

Run:

/opt/lampp/bin/pecl install imagick

If installation completes successfully, you will see:

install ok: channel://pecl.php.net/imagick

Step 2.3 – Enable Imagick in XAMPP PHP

First backup your php.ini:

sudo cp -a /opt/lampp/etc/php.ini /opt/lampp/etc/php.ini.backup

Then add the extension:

echo "extension=imagick.so" | sudo tee -a /opt/lampp/etc/php.ini

Step 2.4 – Restart XAMPP

sudo /opt/lampp/lampp restart

Step 2.5 – Verify Imagick is Working

Check:

/opt/lampp/bin/php -m | grep -i imagick

You should see:

imagick

Now confirm WebP support:

/opt/lampp/bin/php -r 'echo in_array("WEBP", \Imagick::queryFormats()) ? "WEBP OK\n" : "WEBP MISSING\n";'

If you see:

WEBP OK

Your server now supports WebP via Imagick.


Step 3 – Force Laravel / Intervention to Use Imagick

Even after installing Imagick, your app may still use GD.

Check if this file exists:

config/image.php

If it exists, open it:

nano config/image.php

Change:

'driver' => 'gd',

To:

'driver' => 'imagick',

Then clear Laravel config:

cd /opt/lampp/htdocs/your-project
/opt/lampp/bin/php artisan config:clear
/opt/lampp/bin/php artisan cache:clear

Restart XAMPP:

sudo /opt/lampp/lampp restart

Now your application will use Imagick instead of GD.


Step 4 – Final WebP Test

Run this test:

cd /opt/lampp/htdocs/your-project

/opt/lampp/bin/php -r '
require "vendor/autoload.php";
use Intervention\Image\ImageManager;
$m = new ImageManager(["driver"=>"imagick"]);
$img = $m->canvas(120, 80, "#ff9900");
$img->encode("webp", 90);
echo "WebP encoding successful\n";
'

If you see:

WebP encoding successful

The issue is completely resolved.


Why You Should NOT Rebuild GD on Production

Rebuilding PHP with:

--with-webp

requires:

  • Downloading PHP source
  • Compiling against XAMPP Apache
  • Overwriting PHP binaries
  • Risking Apache failure
  • Possible segmentation faults

This is high-risk and unnecessary when Imagick works perfectly.


Best Practice for Production Servers

For long-term stability, consider moving away from XAMPP on Linux.

Recommended production stack:

  • Ubuntu Server
  • Nginx or Apache
  • PHP-FPM
  • php8.2-gd
  • php8.2-imagick

Install using:

sudo apt install php8.2-gd php8.2-imagick

This gives stable, package-managed WebP support.


Final Summary

If you see:

WebP format is not supported by PHP installation

The problem is almost always:

GD compiled without WebP support.

The safest solution is:

Install Imagick
Enable it in php.ini
Switch Intervention driver to imagick

This method avoids rebuilding PHP and prevents server instability.

Post Views: 576
Subscribe
Login
Notify of
guest
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
  • Incorrect definition of table mysql.column_stats
  • Mautic and PHP 8.3 Compatibility Guide (2026)
  • Certified AIOps Engineer: The Complete Career Path and Certification Guide
  • How to Rename Apache Virtual Host Files Safely (Step-by-Step Guide for Linux)
  • AIOps Foundation Certification: Everything You Need to Know to Get Certified
  • DevOps to Certified Site Reliability Professional: A Senior Mentor’s Guide
  • Certified Site Reliability Manager Training, Preparation, and Career Mapping
  • Certified Site Reliability Architect: The Complete Career Guide
  • What Is a VPN? A Complete Beginner-to-Advanced Tutorial
  • How to Install, Secure, and Tune MySQL 8.4 on Ubuntu 24.04 for Apache Event MPM and PHP-FPM
  • Complete Guide to Certified Site Reliability Engineer Career
  • Certified DevSecOps Professional Step by Step
  • Certified DevSecOps Manager: Complete Career Guide
  • Certified DevSecOps Engineer: Skills, Career Path and Certification Guide
  • Step-by-Step: Become a Certified DevSecOps Architect
  • Tuning PHP 8.3 for Apache Event MPM and PHP-FPM on Ubuntu: A Complete Step-by-Step Production Guide
  • Complete Step-by-Step Guide to Configure Apache Event MPM, Create index.php, Set Up VirtualHost, and Fix Ubuntu Default Page
  • Convert XAMPP Apache to Event MPM + System PHP-FPM
  • The Gateway to System Observability Engineering (MOE)
  • How to Finetune Apache and Prove It Works: A Real-World Guide to Testing Performance, Concurrency, HTTP/2, Memory, CPU, and Security
  • Building a High-Performance Apache Event MPM + PHP-FPM + MariaDB Stack (Advanced Server Optimization Guide)
  • Master Infrastructure as Code: The Complete Hashicorp Terraform Associate Guide
  • Building a High-Performance Apache Server with Event MPM + PHP-FPM (Step-by-Step Guide)
  • Is XAMPP Safer for Production Than Using Apache and PHP as Root? 2026 Practical Guide
  • Unlock Cloud Security Expertise with Certified Kubernetes Security Specialist (CKS)
  • How to Fix wpDiscuz Not Replacing Default WordPress Comments in Block Themes
  • Complete Guide to Certified Kubernetes Application Developer Certification
  • Overview of Certified Kubernetes Administrator (CKA) Certification
  • How to Install and Configure XAMPP on Ubuntu 24 Server (Latest Version – 2026 Complete Guide)
  • Mastering the Google Cloud Professional DevOps Engineer

Recent Comments

  1. digital banking on Complete Tutorial: Setting Up Laravel Telescope Correctly (Windows + XAMPP + Custom Domain)
  2. SAHIL DHINGRA on How to Uninstall Xampp from your machine when it is not visible in Control panel programs & Feature ?
  3. Abhishek on MySQL: List of Comprehensive List of approach to secure MySQL servers.
  4. Kristina on Best practices to followed in .httacess to avoid DDOS attack?
  5. Roshan Jha on Git all Commands

Archives

  • April 2026
  • March 2026
  • February 2026
  • January 2026
  • December 2025
  • November 2025
  • October 2025
  • September 2025
  • August 2025
  • July 2025
  • June 2025
  • May 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022

Categories

  • Ai
  • AI Blogging
  • AiOps
  • ajax
  • Android Studio
  • Antimalware
  • Antivirus
  • Apache
  • Api
  • API Security
  • Api Testing
  • APK
  • Aws
  • Bike Rental Services
  • ChatGPT
  • Code Linting
  • Composer
  • cPanel
  • Cyber Threat Intelligence
  • Cybersecurity
  • Data Loss Prevention
  • Database
  • dataops
  • Deception Technology
  • DeepSeek
  • Devops
  • DevSecOps
  • DevTools
  • Digital Asset Management
  • Digital Certificates
  • Docker
  • Drupal
  • emulator
  • Encryption Tools
  • Endpoint Security Tools
  • Error
  • facebook
  • Firewalls
  • Flutter
  • git
  • GITHUB
  • Google Antigravity
  • Google play console
  • Google reCAPTCHA
  • Gradle
  • Guest posting
  • health and fitness
  • IDE
  • Identity and Access Management
  • Incident Response
  • Instagram
  • Intrusion Detection and Prevention Systems
  • jobs
  • Joomla
  • Keycloak
  • Laravel
  • Law News
  • Lawyer Discussion
  • Legal Advice
  • Linkedin
  • Linkedin Api
  • Linux
  • Livewire
  • Mautic
  • Medical Tourism
  • MlOps
  • MobaXterm
  • Mobile Device Management
  • Multi-Factor Authentication
  • MySql
  • Network Traffic Analysis tools
  • Paytm
  • Penetration Testing
  • php
  • PHPMyAdmin
  • Pinterest Api
  • Quora
  • SAST
  • SecOps
  • Secure File Transfer Protocol
  • Security Analytics Tools
  • Security Auditing Tools
  • Security Information and Event Management
  • Seo
  • Server Management Tools
  • Single Sign-On
  • Site Reliability Engineering
  • soft 404
  • software
  • SuiteCRM
  • SysOps
  • Threat Model
  • Twitter
  • Twitter Api
  • ubuntu
  • Uncategorized
  • Virtual Host
  • Virtual Private Networks
  • VPNs
  • Vulnerability Assessment Tools
  • Web Application Firewalls
  • Windows Processor
  • Wordpress
  • WSL (Windows Subsystem for Linux)
  • X.com
  • Xampp
  • Youtube
©2026 DevSecOps Now!!! | WordPress Theme: EcoCoded
wpDiscuz