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.conforapache2.conf). - Look for the
AddTypedirectives forimage/avifandimage/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_mimemodule is enabled in your Apache server. This module is responsible for handling MIME types.
- Ensure that the
- Test Image Delivery:
- Use tools like
curlto check theContent-Typeheader 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-Typefor each image format.
- Use tools like
