Configuring PHP Modules for AVIF Support on WPCloud
How to enable required PHP modules for AVIF image support using CloudLinux PHP Selector.
Complete Guide to AVIF Image Support on WPCloud
Overview
While WordPress 6.5 introduced native AVIF image support, proper server configuration is required to handle these files. This guide covers everything you need to know about AVIF support on WPCloud hosting platforms.
Requirements
WordPress Version
- WordPress 6.5 or higher required for AVIF support
- WordPress 6.7+ recommended for optimal performance
PHP Configuration
- Minimum PHP Version: 8.1
- Recommended PHP Version: 8.2 or 8.3
- Required PHP Modules: (Enabled by default)
- gd (with AVIF support)
- fileinfo
- imagick
Configuration Steps
Update PHP Version
- Log into cPanel
- Navigate to "Select PHP Version"
- Choose PHP 8.1 or higher
- Click "Apply"
Important Note: On WPCloud, all required modules (gd, fileinfo, imagick) are enabled by default. If you encounter AVIF upload issues, simply:
- Click "Reset to Default" in PHP Selector after changing PHP versions
- This automatically enables all required modules with optimal settings
There's no need to manually enable modules unless you've previously modified the default configuration.
Troubleshooting
Common Error Messages
If you see: "This image cannot be processed by the web server. Convert it to JPEG or PNG before uploading"
Possible Causes:
- PHP version below 8.1
- Non-default PHP module configuration
- Server-level image processing limitations
Solutions
Immediate Workarounds
- Convert AVIF to WebP format (similar compression benefits)
- Use standard JPEG/PNG formats temporarily
- Contact support for server-side verification
For Advanced Users
If you need to use original AVIF images:
wp_get_attachment_image($image_id, 'original_image');
Best Practices
- Keep original images in standard formats (JPEG/PNG)
- Use WebP as fallback when AVIF isn't supported
- Regularly verify PHP configuration
- Test AVIF uploads after any PHP version changes
Performance Notes
- AVIF offers superior compression compared to JPEG and PNG
- Server-side processing of AVIF images may require more resources
- Consider using WebP as a balanced alternative
Support Options
If you continue experiencing issues:
- Open Support Ticket:
- Portal: support.wpcloud.ca
- Email: support@wpcloud.ca
- Include in Your Ticket:
- WordPress version
- Current PHP version
- Exact error message
- Sample AVIF file (if possible)
Related Resources
- WordPress 6.5+ Documentation
- PHP GD Documentation
- WPCloud System Status: Status Page
Note: This article is regularly updated to reflect the latest WPCloud hosting environment configurations and WordPress requirements.
Last updated on November 26, 2024