To check if your Apache server supports AVIF and WebP image formats, you can follow these steps:
- Check MIME Types Configuration:
- Open your Apache configuration file (usually
httpd.conf
orapache2.conf
). - Look for the
AddType
directives forimage/avif
andimage/webp
. If they are not present, you can add them:AddType image/avif .avif AddType image/webp .webp
- Open your Apache configuration file (usually
- Verify Image Serving:
- Create a simple HTML file with references to AVIF and WebP images.
- Upload the images to your server and open the HTML file in a browser to see if the images are displayed correctly.
- Check for Required Modules:
- Ensure that the
mod_mime
module is enabled in your Apache server. This module is responsible for handling MIME types.
- Ensure that the
- Test Image Delivery:
- Use tools like
curl
to check theContent-Type
header for your AVIF and WebP images:curl -I http://your-server.com/path/to/image.avif curl -I http://your-server.com/path/to/image.webp
- The response should include the correct
Content-Type
for each image format.
- Use tools like