Problem:
The customer created a custom post field for images but was unable to upload AVIF format files to the field, despite AVIF images being supported elsewhere in their WordPress media library. They requested a solution to enable AVIF uploads in Toolset's custom image field.
Solution:
A code snippet was provided to extend the valid image file types for Toolset, allowing AVIF images. The customer added this code to their theme’s functions.php file or within Toolset > Settings >
function allow_avif_in_toolset( $valid_extensions ) { // Add AVIF to the list of valid extensions $valid_extensions[] = 'avif'; return $valid_extensions; } add_filter( 'toolset_valid_image_extentions', 'allow_avif_in_toolset' );
This code successfully enabled the AVIF format in the custom image field, allowing the customer to upload AVIF images as intended.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | - |
- | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | - |
Supporter timezone: America/Sao_Paulo (GMT-03:00)
This topic contains 1 reply, has 2 voices.
Last updated by 2 months, 1 week ago.
Assisted by: Mateus Getulio.