最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Workaround to upload AVIF files

programmeradmin0浏览0评论

Has anyone found a good way to upload AVIF images files through the WordPress media uploader?

I've seen variations of this code posted everywhere:

function allowed_mime_types( $mime_types ) {

  //AVIF Images
  $mime_types['avif'] = 'image/avif';

  return $mime_types;
}

add_filter( 'upload_mimes', 'allowed_mime_types' );

But, when I use that I still get an error:

Sorry, this file type is not permitted for security reasons.

I confirmed that avif is added to the list of extensions in the plupload localized script vars, but still no joy. What am I missing?

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论