• 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 60

    exif_read_data() works only on jpeg and tiff files.
    Maybe you should take a look at wp_read_image_metadata() and the way it handles exif_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;

    https://ww.wp.xz.cn/plugins/imsanity/

Viewing 3 replies - 1 through 3 (of 3 total)
  • ah thanks for the report, i’ll have to do a check for jpg images before running the exif functions

    +1

    I’m getting the same fatal exif_read_data() error when trying to upload any large PNG file (with Imsanity activated) when it tries to scale it down.

    this was fixed in version 2.2.9 – thanks for the report

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘A warning when fetching exif data’ is closed to new replies.