Hello
I tested on my end with a .avif file and it was able to load fine. Let me ask a couple of questions:
- Are you uploading a .avif file directly, or using a plugin or CDN to generate the .avif on the fly?
- Have you tried excluding this .avif file from Cloudflare temporarily to see if there is perhaps an interference there?
What I would start by trying, is having WC Cart PDF load the file from the server directly instead of over http to see if that helps. Could you paste this function in your child theme functions.php or in a snippet somewhere to see if that helps?
/**
* Replace image URLs with local paths in the cart PDF.
*
* @param string $content The cart PDF content.
* @return string
*/
add_filter( 'wc_cart_pdf_content', function( $content ) {
$wp_upload_dir = wp_upload_dir();
$content = str_replace( $wp_upload_dir['baseurl'], $wp_upload_dir['basedir'], $content );
return $content;
} );
I’m going to mark this as resolved but if this is not the case feel free to reach out again, thank you