| 1 | | This works for me, WP 6.8-RC2, the icon is a svg file: |
| 2 | | |
| 3 | | Change in file /wp-includes/media.php: |
| 4 | | |
| 5 | | |
| 6 | | {{{ |
| 7 | | function wp_getimagesize( $filename, ?array &$image_info = null ) { |
| 8 | | if ( ! file_exists( $filename ) ) { |
| 9 | | return false; |
| 10 | | } |
| 11 | | }}} |
| 12 | | |
| 13 | | Change in file /wp-includes/functions.php: |
| 14 | | |
| 15 | | |
| 16 | | {{{ |
| 17 | | function wp_get_image_mime( $file ) { |
| 18 | | /* |
| 19 | | * Use exif_imagetype() to check the mimetype if available or fall back to |
| 20 | | * getimagesize() if exif isn't available. If either function throws an Exception |
| 21 | | * we assume the file could not be validated. |
| 22 | | */ |
| 23 | | |
| 24 | | if ( ! file_exists( $file ) ) { |
| 25 | | return false; |
| 26 | | } |
| 27 | | |
| 28 | | }}} |
| 29 | | |
| 30 | | But I don't have the knowledge to decide whether this applies to everyone. And the solution would be too simple. otherwise the bug would surely already be solved, wouldn't it? |
| | 1 | Forget my reply. I'm sorry. |