MMWW

This plugin integrates your media metadata workflow with WordPress's Media Library.

Author:Oliver Jones (profile at wordpress.org)
WordPress version required:3.0.1
WordPress version tested:6.1
Plugin version:1.0.9
Added to WordPress repository:04-12-2012
Last updated:04-11-2022
Rating, %:90
Rated by:11
Plugin URI:https://www.plumislandmedia.net/wordpress-plu...
Total downloads:7 187
Active installs:100+
plugin download
Click to start download

If you create lots of images, graphics, audio clips, or video clips you probably go to some trouble to put metadata (titles, copyrights, track names, dates, and all that) into them. You may also put tags and ratings (one to five stars) on your media files.

  • JPEG image files have EXIF metadata.
  • MP3 audio clips have ID3 metadata.
  • PNG files have their own kind of metadata.
  • Adobe is pushing an interoperable standard called XMP to hold metadata as well.

If you use a production tool like Acrobat, Adobe Bridge or Audacity, you probably put this kind of metadata into your files. And then you probably rekey it when you put the files into your WordPress site.

This Media Metadata Workflow Wizard plugin will get you out of doing that. Now you can have that metadata transferred into the Media Library automatically when you upload your media.

You can choose to have the creation date in your media file used as the “Uploaded” date in WordPress. So, for example, your photos can be ordered in the media library in order of the date and time they were taken, and your pdfs in the order they were scanned.

You can specify templates defining what metadata items should be used to create each WordPress attachment post’s fields: title, caption, alt text, and description.

For audio files, MMWW can automatically create the shortcode provided by Jetpack. Choose Link To Media File and the shortcode will be generated for you. WordPress 3.6 and later has an integrated audio player, so you may not need this feature. The Settings page lets you turn this behavior off.

If you use the [Media Tags][https://wordpress.org/plugins/media-tags/] plugin together with this one, you’ll be able to handle metadata tags as a taxonomy. You can also use metadata ratings (one to five stars) as a taxonomy.

Metadata templates

Once the plugin is installed and activated, it will populate the text fields in your site’s attachment
posts using metadata from the media files you upload.

Text fields for attachments

The attachment text files are Title, Description, Caption and Alternate Text. The Title of the attachment is also used to create the slug.

  • The Description is free text describing the media item.
  • The Caption is displayed underneath photos in posts.
  • The Alternate Text is embedded in the IMG tag in the post. It serves two purposes: describing the image in textual form
    for people who use screen readers because they cannot see the images, and for describing the image to search engines.

Using metadata templates

Many media editor programs, such as Photoshop, Paint Shop Pro, Acrobat and Audacity have ways of loading metadata into media. These usually can be found in a dialog box named “Properties,” “Image Information,” or something similar.

MMWW’s settings page lets you specify the templates to use for populating the text fields. For example, you can set the Description template for an image file from a smartphone to

({description} )({shutter}--{fstop} )({latitude}/{longitude} )({created_time})

and you’ll see some details about how, where, and when the photo was taken in your Description.

You can use parentheses to delimit optional parts of a metadata template string. For example, not all media files contain {copyright} metadata. If you put this into your metadata template string, it will omit the whole copyright clause if there’s no {copyright} metadata. Notice that there’s a trailing space before the closing parenthesis. This separates this clause (if it appears) from the next one.

  (Copyright © {copyright} )

The parentheses denote the whole clause as optional, and omitted if the metadata mentioned in it is not available.

Similarly, you can create a URL that will display a map centered on the spot your photo was taken, but only if latitude and longitude are available in the photo’s metadata, like this:

 (<A href="https://maps.google.com/?ll={latitude},{longitude}&z=18" target="_blank">\(Map {title}\)</A>)

If you want literal parentheses or curly braces to appear in your metadata, use the backslash character to escape them in your template data.

JPEG image files

JPEG photo files have lots of possible metadata. Not every photograph has all these items of metadata, but most have some of them.

 {title}           Title of the file.
 {filename}        Filename of the file. e.g. "DSC_5007" (without .jpg)
 {credit}          Author.
 {copyright}       Copyright notice if any is included.
 {description}     Narrative description.
 {tags}            One or more keyword tags, separated by semicolons.
 {rating}          0 - 5, set by various image browsers
 {workflowlabel}   A text string like "Discard" or "Keep," set by various image browsers
 {camera}          Camera model
 {shutter}         Shutter speed, such as 1/60
 {shutter_speed}   Raw shutter speed, such as 60
 {fstop}           Aperture, like f/5.6
 {aperture}        Raw aperture, like 5.60
 {flash}           Flash setting, such as "No Flash" or "Fired, Red-eye reduction"
 {focal_length}    Lens's focal length in mm.
 {focal_length35}  Lens's 35mm film focal length equivalent in mm.
 {lightsource}     Kind of light detected, such as "Daylight" or "Tungsten"
 {meteringmode}    Type of metering the camera used, such as "Spot," "Average," or "Unknown"
 {sensingmethod}   Type of image sensor, such as "One-chip color area sensor."
 {exposuremode}    Exposure mode, such as "Auto" or "Manual"
 {exposureprogram} Exposure-setting program, such as "Aperture Priority" or "Normal Program."
 {exposurebias}    Selected exposure bias.
 {brightness}      A number indicating how bright the scene is
 {scene_capture_type}  Scene capture type. Standard, Landscape, Portrait, Night
 {sharpness}       Image's sharpness.  Normal, Soft, Hard
 {latitude}        GPS latitude reading, shown in degrees and decimals.
 {longitude}       GPS longitude reading, showin in degrees and decimals.
 {altitude}        GPS altitude in meters above sea level
 {direction}       Direction of photograph. 270M means magnetic west, 180T means true south.
 {subject_distance} Distance to subject from autofocus or other means.
 {created_time}    Timestamp when the photograph was taken.

IPTC metadata in JPEG image files

The International Press Telecommunications Council has defined many items of metadata to go in photo files. This metadata helps photojournalists and publications do business efficiently. Various tools, such as Adobe Bridge, allow this metadata to be inserted. MMWW can retrieve it, with these tags

  {iptc:creator}              The creator's name.
  {iptc:creator:jobtitle}     The creator's job title.
  {iptc:creator:address}      The creator's address.
  {iptc:creator:city}         The creator's city.
  {iptc:creator:state}        The creator's state or province.
  {iptc:creator:postcode}     The creator's post / zip code.
  {iptc:creator:country}      The creator's country.
  {iptc:creator:phone}        The creator's phone(s).
  {iptc:creator:email}        The creator's email(s).
  {iptc:creator:website}      The creator's web site(s).
  {iptc:headline}             Headline.
  {iptc:description}          Description.
  {iptc:keywords}             Keywords, separated with comma or semicolon.
  {iptc:iptcsubjectcode}      IPTC subject code.
  {iptc:descriptionwriter}    Author of the description.
  {iptc:datecreated}          Creation date.
  {iptc:genre}                Intellectual genre.
  {iptc:scenecode}            IPTC scene code.
  {iptc:datecreated}          Creation date.
  {iptc:sublocation}          Location within city.
  {iptc:city}                 City.
  {iptc:state}                State/Province.
  {iptc:country}              Country.
  {iptc:iscocountrycode}      Country code per ISO 3166.
  {iptc:title}                Title.
  {iptc:jobidentifier}        Job Identifier.
  {iptc:instructions}         Instructions.
  {iptc:creditline}           Credit line.
  {iptc:source}               Source.
  {iptc:copyright}            Copyright Notice.
  {iptc:copyrightstatus}      Copyright Status.
  {iptc:rightsusageterms}     Terms of usage.

PNG image files

PNG image files have a few items of metadata. Most creators of PNG files don’t know this metadata exists so it isn’t often present.

 {title}               Title of the file.
 {credit}              Author.
 {copyright}           Copyright notice if any is included.
 {description}         Narrative description.
 {created_time}        The timestamp describing the time the PNG was made.
 {filename}            Filename of the file. e.g. "icon" (without .png)

PDF

PDF files, created by Adobe Acrobat and other programs, have a few items of metadata. The most generally useful of these are the title and credit.

 {title}               Title of the file.
 {credit}              Author.
 {copyright}           Copyright notice if any is included.
 {description}         Narrative description.
 {tags}                One or more keyword tags, separated by semicolons.
 {rating}              0 - 5 
 {created_time}        The timestamp describing the time the PDF was made.
 {software}            Program used to create PDF.
 {filename}            Filename of the file. e.g. "scan1234" (without .pdf)

Audio

MP3 Audio files can have lots of metadata, defined by the ID3 standard. The first few items are by far more common than the others.

 {title}               Title of the song.
 {album}               Title of the album.
 {credit}              Author or performer.
 {year}                Year of recording.
 {copyright}           Copyright notice if any is included.
 {description}         Narrative description.
 {rating}              0 - 5.
 {filename}            Filename of the file. e.g. "TRACK_003" (without .mp3).

These metadata items are in the ID3 standard for MP3 files, but most files don’t have them. MMWW handles them
in case your particular media workflow needs them.

 {tempo}
 {genre}
 {grouptitle}
 {keysignature}
 {DDMM}              Day and month of recording
 {HHMM}              Hour and minute of recording
 {duration}
 {creditlead}
 {creditconductor}
 {creditproducer}
 {writer}
 {creditorganization}
 {mediatype}
 {creditoriginal}
 {copyright}

WordPress information for all files

 {wp:attachmentid} gives the post id of the present post.
 {wp:parentid} gives the post id of the post to which this media file is attached.
 {wp:parenttitle} gives the title of the post to which this media file is attached.
 {wp:parentslug} gives the slug (url fragment) of the post to which this media file is attached.

These may be missing if those values are unknown at the time of media creation. Reloading the media metadata will
insert them.

A note about timestamps

MMWW has a setting that allows attachment dates to be set using the timestamp in the media’s metadata. For example, the upload date for a photo can be set to the moment the photo was taken. That way, photos in your Media Library tab will appear in the order they were taken (if that’s what you want).

There’s a detail to this: The timestamps in the media files need to be interpreted relative to a time zone to make this work correctly. Consider the example of a photo taken in September in New York City and uploaded in November. The timestamp in the photo is recorded in Eastern Daylight Time, but the current timezone setting is Eastern Standard Time. MMWW does the right thing by interpreting the photo’s timestamp relative to the timezone chosen on WordPress’s General Settings page. If you’re getting strange times of day in your attachment dates, please check that the timezone setting on the General Settings page is correct.

Metadata Standards Reference

To Do

  • Figure out how to put keywords into a taxonomy if that’s what the user wants.
  • Add support for the Yet Another Photo Blog (YAPB) [plugin]{https://wordpress.org/extend/plugins/yet-another-photoblog/}
  • Improve the syntax of the templates.
  • Add support for aac and video file metadata.
  • Ask for and receive lots of sample files from users, and use them to test.
  • Come up with a better way to handle commas in metadata when generating audio shortcodes.
  • Figure out a taxonomy to handle the media ratings in XMP.
  • Support TIFF files. (Please let the author know if you need TIFF support.)

Credits

Ognjen Djuraskovic of firstsiteguide.com has generously provided Serbian and Spanish translations of MMWW. Хвала / Gracias / Thanks Ognjen!

This plugin incorporates the Zend Media Framework by Sven Vollbehr and Ryan Butterfield which they generously made available under the BSD license. It comes in handy for retrieving and decoding the ID3 tags from audio files. See the LICENSE.txt file in this distribution. Copyright (c) 2005-2009 Zend Technologies USA Inc. (https://www.zend.com) Thanks, Sven and Ryan!


FAQ
ChangeLog