• I’d like to suggest an option for admins to globally turn off extraction of EXIF info into attachment title, caption fields.

    Reason – we deal with images in a time sensitive way. We do minimal processing, sometimes none. Many cameras insert dummy info like “Sony DSC” and the like into their title, caption, description areas. If we upload 50 images from a live event, they will all have the title of “Sony DSC”.

    This also renders sorting by title useless using gallery shortcode. If it were based off file name, the way it would be if no EXIF dummy titles were there, then we could sort by title, ASC, and view the pictures in the order taken.

    I understand you can strip it with a processing program pre-upload. Many occasions we don’t have the time, the ability (working from mobile or tablets), or dealing with inexperienced part-time contributors. So that’s not a real option.

    I understand it’s better for me, and the web, if we fill out every single meta data field for every image in a unique descriptive manner. But in real life work flow, this is just not possible all the time. So, I’d prefer to turn it off, and add that stuff in if/when I can later.

    The code in question is in wp-admin/includes/media.php

    // use image exif/iptc data for title and caption defaults if possible
    	if ( $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'] ) )
    			$content = $image_meta['caption'];
    	}

    Adding an action so we can remove and recreate it with that commented out, would be preferred. Or of course, a real settings option in backend.

    I currently re-run the title creation via a function added to add_attachment, but it’s redundant when all we need to do is remove that code from media.php to achieve the same result.

    Thanks for reading.

  • The topic ‘Settings option for EXIF extraction’ is closed to new replies.