Where in core ?
These parts here and here, are responsible for overriding the image title with meta data:
// ... cut ...
// Use image exif/iptc data for title and caption defaults if possible.
} elseif (
0 === strpos( $type, 'image/' )
&& $image_meta = @wp_read_image_metadata( $file )
) {
if (
trim( $image_meta['title'] )
&& ! is_numeric( sanitize_title( $image_meta['title'] ) )
) {
$title = $image_meta['title'];
}
if ( trim( $image_meta['caption'] ) ) {
$excerpt = $image_meta['caption'];
}
}
// ... cut ...
Possible workaround:
One can bypass this feature by overriding the meta title for jpeg
and tiff
images (PHP 5.4+):
/**
* Override the meta title for jpeg/tiff images
*
* @link http://wordpress.stackexchange.com/a/192779/26350
*/
add_filter( 'wp_read_image_metadata', function( $meta, $file, $sourceImageType )
{
$image_types = [ IMAGETYPE_JPEG, IMAGETYPE_TIFF_II, IMAGETYPE_TIFF_MM ];
if( ! empty( $meta['title'] ) && in_array( $sourceImageType, $image_types ) )
$meta['title'] = ''; // <-- Edit this to your needs!
return $meta;
}, 10, 3 );