wp_show_heic_upload_error()
Callback to enable showing of the user error when uploading .heic images.
No Hooks.
Returns
Array[]. Modified settings for Plupload.js.
Usage
wp_show_heic_upload_error( $plupload_settings );
- $plupload_settings(array[]) (required)
- The settings for Plupload.js.
Changelog
| Since 5.5.0 | Introduced. |
| Since 6.7.0 | The default behavior is to enable heic uploads as long as the server supports the format. The uploads are converted to JPEG's by default. |
wp_show_heic_upload_error() wp show heic upload error code WP 6.9.1
function wp_show_heic_upload_error( $plupload_settings ) {
// Check if HEIC images can be edited.
if ( ! wp_image_editor_supports( array( 'mime_type' => 'image/heic' ) ) ) {
$plupload_init['heic_upload_error'] = true;
}
return $plupload_settings;
}