Skip to content

Commit

Permalink
Fix settings to match file.type
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsilverstein committed Jan 13, 2025
1 parent a1d3fc1 commit 605bf32
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/block-editor-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,17 @@ function gutenberg_get_block_editor_settings( $settings ) {

// Check if WebP images can be edited.
if ( ! wp_image_editor_supports( array( 'mime_type' => 'image/webp' ) ) ) {
$settings['typesNotSupportedByServer']['webp'] = true;
$settings['typesNotSupportedByServer']['image/webp'] = true;
}

// Check if AVIF images can be edited.
if ( ! wp_image_editor_supports( array( 'mime_type' => 'image/avif' ) ) ) {
$settings['typesNotSupportedByServer']['avif'] = true;
$settings['typesNotSupportedByServer']['image/avif'] = true;
}

// Check if HEIC images can be edited.
if ( ! wp_image_editor_supports( array( 'mime_type' => 'image/heic' ) ) ) {
$settings['typesNotSupportedByServer']['heic'] = true;
$settings['typesNotSupportedByServer']['image/heic'] = true;
}

$settings['styles'] = array_merge( $global_styles, get_block_editor_theme_styles() );
Expand Down

0 comments on commit 605bf32

Please sign in to comment.