A warning when fetching exif data
-
Hello.
I have a warning when an image is resized:
Warning: exif_read_data(image.png) [function.exif-read-data]: File not supported in /path/to/wp-content/plugins/imsanity/libs/utils.php on line 60exif_read_data()works only on jpeg and tiff files.
Maybe you should take a look at wp_read_image_metadata() and the way it handlesexif_read_data().list( , , $sourceImageType ) = getimagesize( $file ); if ( is_callable( 'exif_read_data' ) && in_array( $sourceImageType, apply_filters( 'wp_read_image_metadata_types', array( IMAGETYPE_JPEG, IMAGETYPE_TIFF_II, IMAGETYPE_TIFF_MM ) ) ) ) { $exif = @exif_read_data( $file ); $orientation = is_array( $exif ) && array_key_exists( 'Orientation', $exif ) ? $exif['Orientation'] : 0;
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘A warning when fetching exif data’ is closed to new replies.