Enable font mimetypes for upload
Leave a Reply
3 Comments
-
Hi,
what mime-types are you missing?
With the Premium Add-On installed we add the following mime-types to the upload-mimes:
/** * Allow font uploads. * * @param array $mime_types The mime types. * * @return array The updated mime types. */ function wpbf_add_custom_upload_mimes( $mime_types ) { $mime_types['otf'] = 'application/x-font-otf'; $mime_types['woff'] = 'application/x-font-woff'; $mime_types['woff2'] = 'application/x-font-woff2'; $mime_types['ttf'] = 'application/x-font-ttf'; $mime_types['svg'] = 'image/svg+xml'; $mime_types['eot'] = 'application/vnd.ms-fontobject'; return $mime_types; } add_filter( 'upload_mimes', 'wpbf_add_custom_upload_mimes', 0 );
-
I was trying to upload a TTF, and it wasn’t allowing it. Interesting. Maybe it’s a bug?
-
I’m closing this for now as we basically have this already in place.
Can you please open a ticket and attach the TTF file that you’ve tried to upload? I’m going to try to replicate & debug this.
https://wp-pagebuilderframework.com/support/
Thanks! 🙂
Comments are closed.
3 Comments
Hi,
what mime-types are you missing?
With the Premium Add-On installed we add the following mime-types to the upload-mimes:
I was trying to upload a TTF, and it wasn’t allowing it. Interesting. Maybe it’s a bug?
I’m closing this for now as we basically have this already in place.
Can you please open a ticket and attach the TTF file that you’ve tried to upload? I’m going to try to replicate & debug this.
https://wp-pagebuilderframework.com/support/
Thanks! 🙂