Support » Plugin: Media Library Assistant » How to use exif_read_data and ALL_IPTC

  • Resolved nelle2

    (@nelle2)


    Hello David!
    Thank You for providing this fascinating plugin!
    It’s great to be able to browse the media by different taxonomies.
    I guess your plugin can do much more but have some difficulties in finding out how.
    The support-forum (and you) seem to be very active, but I found no sensible way to search inside the forum. I already read a lot of topics but I can’t read all of them to find what I’m searching for. So I now write to you directly.
    Please let me frist introduce my circumstances:
    I’m new to WordPress and don’t know anything about php and the WP Shortcode API.
    My Goal is to create a new website for the business of my wife. She’s specialized in restoration and preservation of mural art, sculpture painting and so on. She will need to use a lot of foto-material on her pages that will need to be categorized. For SEO-Optimization and for better organization I would like to put alt-text, caption, title, description, copyright, keywords and so on into the Metadata of the files. To do this, I found a perfect tool to administrate the metadata that also works as a catalog:
    https://sourceforge.net/projects/fastphototagger/
    it uses the meta-tags of the ExifTool written by Phil Harvey.
    Now I would like to “import” these metadata to standard WP-Fields and (if no standard field fits) custom fields. I read the appropriate sections of the documentation and tried to configure the IPTC/EXIF Tab (see sreenshot). But I cannot see any result. I guessed, that the tag-names and tag-ids produced by fastphototagger and ExifTool differ from the ones used by MLA-plugin and tried to get a list of all meta-tags found by MLA-plugin as described in this post.
    But I don’t get any output . I had expected something like the exif_read_data Array Dump in the post above. I guess that I used the wrong syntax (tried [mla_gallery +exif:ALL_EXIF+] and [mla_gallery +iptc:ALL_IPTC+]).
    Can you provide me with a shortcut, that gives away all the meta-data of an image file?
    That would be great!
    Niels

    https://wordpress.org/plugins/media-library-assistant/

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your kind words about MLA and for the detailed description of your application and questions. I share your frustration about searching within the forum, as have several others over the months/years.

    Here is a more recent support topic that might help, and it contains links to other topics along similar lines:

    Lightroom IPTC Description Field > WordPress Description Field

    The shortcode syntax can be a bit tricky if you’re new to WordPress, and the examples you’ve included are reasonable attempts; you’re on the right track. My favorite approach for a quick look at the data uses [mla_gallery] and its mla_caption parameter:

    [mla_gallery columns=1 post_parent=all posts_per_page=10 mla_caption="{+iptc:ALL_IPTC+}"]

    In this example, columns=1 puts each gallery item on its own line, post_parent=all selects all of the image items in your Media Library, posts_per_page=10 limits the gallery display to ten items and mla_caption="{+iptc:ALL_IPTC+}" displays the IPTC metadata under the image thumbnail. If you want to see everything at once, try something like:

    [mla_gallery columns=1 post_parent=all posts_per_page=10 mla_caption="{+iptc:ALL_IPTC+}<br>{+exif:ALL_EXIF+}<br>{+xmp:ALL_XMP+}"]

    You will discover that EXIF and XMP data has a lot of arrays, which appear as placeholders in the above results. You can explore array values individually by coding something like {+exif:COMPUTED,export+} to expand all levels within the array or {+exif:CAMERA,unpack+} to expand one level within the array. You can go deeper in the array hierarchy with compound names, e.g., {+exif:CAMERA.ShutterSpeed+} or {+exif:CAMERA.LensSpecification,unpack+}. You can find additional examples and discussion in the “Field-level Substitution Parameters” section of the Settings/Media Library Assistant Documentation tab. You can also look through the “MLA Gallery Examples” section of the Documentation for other [mla_gallery] parameters and applications.

    I hope the above will help you make progress in accessing the metadata in your images. If you can post a link to one or more example images I can give you a more specific idea of what’s in them. I will leave this topic unresolved for now. Thanks for your interest I the plugin.

    Hi David,

    Thanks for your quick response!
    For testing I have put only 2 pictures in my Library wich have some custom EXIF/IPTC Data.
    picture P1230115.jpg has the following meta-data according to fastphototagger/ExifTool:

    Composite	AdvancedSceneMode	DMC-LX3 0 1
    Composite	Aperture	2.8
    Composite	BlueBalance	1.573055028463
    Composite	CircleOfConfusion	0.0064098689341582
    Composite	FocalLength35efl	60
    Composite	FOV	33.3985166785074
    Composite	HyperfocalDistance	9.12878037216378
    Composite	ImageSize	3776x2520
    Composite	LightValue	11.6147098441152
    Composite	Megapixels	9.51552
    Composite	RedBalance	1.83965844402277
    Composite	ScaleFactor35efl	4.6875
    Composite	ShutterSpeed	0.003125
    Composite	ThumbnailImage	(Binary data 4966 bytes, use -b option to extract)
    EXIF:ExifIFD	ColorSpace	1
    EXIF:ExifIFD	ComponentsConfiguration	1 2 3 0
    EXIF:ExifIFD	CompressedBitsPerPixel	4
    EXIF:ExifIFD	Contrast	0
    EXIF:ExifIFD	CreateDate	2015:07:15 17:26:52
    EXIF:ExifIFD	CustomRendered	0
    EXIF:ExifIFD	DateTimeOriginal	2015:07:15 17:26:52
    EXIF:ExifIFD	DigitalZoomRatio	0
    EXIF:ExifIFD	ExifImageHeight	2520
    EXIF:ExifIFD	ExifImageWidth	3776
    EXIF:ExifIFD	ExifVersion	0221
    EXIF:ExifIFD	ExposureCompensation	0
    EXIF:ExifIFD	ExposureMode	0
    EXIF:ExifIFD	ExposureProgram	2
    EXIF:ExifIFD	ExposureTime	0.003125
    EXIF:ExifIFD	FileSource	3
    EXIF:ExifIFD	Flash	16
    EXIF:ExifIFD	FlashpixVersion	0100
    EXIF:ExifIFD	FNumber	2.8
    EXIF:ExifIFD	FocalLength	12.8
    EXIF:ExifIFD	FocalLengthIn35mmFormat	60
    EXIF:ExifIFD	GainControl	0
    EXIF:ExifIFD	ISO	80
    EXIF:ExifIFD	LightSource	0
    EXIF:ExifIFD	MaxApertureValue	2
    EXIF:ExifIFD	MeteringMode	5
    EXIF:ExifIFD	Saturation	0
    EXIF:ExifIFD	SceneCaptureType	0
    EXIF:ExifIFD	SceneType	1
    EXIF:ExifIFD	SensingMethod	2
    EXIF:ExifIFD	Sharpness	0
    EXIF:ExifIFD	UserComment	Suchwort1
    EXIF:ExifIFD	WhiteBalance	0
    EXIF:IFD0	Artist	nelle
    EXIF:IFD0	Copyright	Copyright 1
    EXIF:IFD0	DocumentName	Titel1
    EXIF:IFD0	ImageDescription	alt-text 1 1
    EXIF:IFD0	Make	Panasonic
    EXIF:IFD0	Model	DMC-LX3
    EXIF:IFD0	ModifyDate	2015:07:15 17:26:52
    EXIF:IFD0	Orientation	1
    EXIF:IFD0	ResolutionUnit	2
    EXIF:IFD0	Software	Ver.2.2
    EXIF:IFD0	XResolution	180
    EXIF:IFD0	YCbCrPositioning	2
    EXIF:IFD0	YResolution	180
    EXIF:IFD1	Compression	6
    EXIF:IFD1	Orientation	1
    EXIF:IFD1	ResolutionUnit	2
    EXIF:IFD1	ThumbnailLength	4966
    EXIF:IFD1	ThumbnailOffset	10554
    EXIF:IFD1	XResolution	180
    EXIF:IFD1	YCbCrPositioning	2
    EXIF:IFD1	YResolution	180
    EXIF:InteropIFD	InteropIndex	R98
    EXIF:InteropIFD	InteropVersion	0100
    ExifTool	ExifToolVersion	10.09
    File	BitsPerSample	8
    File	ColorComponents	3
    File	CurrentIPTCDigest	851a98d416a8843bdf7144d4578efd7a
    File	EncodingProcess	0
    File	ExifByteOrder	II
    File	FileType	JPEG
    File	FileTypeExtension	JPG
    File	ImageHeight	2520
    File	ImageWidth	3776
    File	MIMEType	image/jpeg
    File:System	Directory	/Users/nd/Documents/Testfotos original/von Lumix/Download mit Finder/Photoshop/JPG nur geöffnet und gespeichert
    File:System	FileAccessDate	2016:02:27 21:45:38+01:00
    File:System	FileInodeChangeDate	2016:02:27 21:36:51+01:00
    File:System	FileModifyDate	2016:02:27 21:36:51+01:00
    File:System	FileName	P1230115.JPG
    File:System	FilePermissions	777
    File:System	FileSize	3281483
    File	YCbCrSubSampling	2 1
    IPTC	ApplicationRecordVersion	4
    IPTC	By-line	nelle
    IPTC	Caption-Abstract	Beschreibung 1
    IPTC	Category	Hauptkategorie 1
    IPTC	CodedCharacterSet	.%G
    IPTC	CopyrightNotice	Copyright 1
    IPTC	Country-PrimaryLocationName	Land 1
    IPTC	EnvelopeRecordVersion	4
    IPTC	Headline	Titel1
    IPTC	Keywords	Suchwort1
    IPTC	ObjectName	Dateiname 1
    IPTC	SupplementalCategories	Unterkategorie1
    MakerNotes:Panasonic	AdvancedSceneType	1
    MakerNotes:Panasonic	AFAreaMode	1 1
    MakerNotes:Panasonic	AFAssistLamp	2
    MakerNotes:Panasonic	AFPointPosition	0.5 0.5
    MakerNotes:Panasonic	Audio	2
    MakerNotes:Panasonic	BabyAge	9999:99:99 00:00:00
    MakerNotes:Panasonic	BurstMode	0
    MakerNotes:Panasonic	ColorEffect	1
    MakerNotes:Panasonic	ColorMode	0
    MakerNotes:Panasonic	ColorTempKelvin	0
    MakerNotes:Panasonic	Contrast	0
    MakerNotes:Panasonic	ContrastMode	0
    MakerNotes:Panasonic	ConversionLens	1
    MakerNotes:Panasonic	DataDump	(Binary data 8200 bytes, use -b option to extract)
    MakerNotes:Panasonic	FacesDetected	0
    MakerNotes:Panasonic	FilmMode	1
    MakerNotes:Panasonic	FirmwareVersion	0 2 2 0
    MakerNotes:Panasonic	FlashBias	0
    MakerNotes:Panasonic	FlashCurtain	0
    MakerNotes:Panasonic	FlashFired	1
    MakerNotes:Panasonic	FocusMode	1
    MakerNotes:Panasonic	ImageQuality	2
    MakerNotes:Panasonic	ImageStabilization	2
    MakerNotes:Panasonic	InternalSerialNumber	F340909190315
    MakerNotes:Panasonic	MacroMode	2
    MakerNotes:Panasonic	MakerNoteVersion	0132
    MakerNotes:Panasonic	NoiseReduction	0
    MakerNotes:Panasonic	NumFacePositions	0
    MakerNotes:Panasonic	OpticalZoomMode	1
    MakerNotes:Panasonic	PanasonicExifVersion	0291
    MakerNotes:Panasonic	PanasonicImageHeight	0
    MakerNotes:Panasonic	PanasonicImageWidth	0
    MakerNotes:Panasonic	ProgramISO	65535
    MakerNotes:Panasonic	Rotation	1
    MakerNotes:Panasonic	Saturation	0
    MakerNotes:Panasonic	SceneMode	0
    MakerNotes:Panasonic	SelfTimer	1
    MakerNotes:Panasonic	SequenceNumber	0
    MakerNotes:Panasonic	Sharpness	0
    MakerNotes:Panasonic	ShootingMode	6
    MakerNotes:Panasonic	TextStamp	1
    MakerNotes:Panasonic	TimeSincePowerOn	45.77
    MakerNotes:Panasonic	TravelDay	65535
    MakerNotes:Panasonic	WBBlueLevel	1658
    MakerNotes:Panasonic	WBGreenLevel	1054
    MakerNotes:Panasonic	WBRedLevel	1939
    MakerNotes:Panasonic	WBShiftAB	0
    MakerNotes:Panasonic	WBShiftGM	0
    MakerNotes:Panasonic	WhiteBalance	1
    MakerNotes:Panasonic	WorldTimeLocation	1
    Photoshop	IPTCDigest	2669d9db102847e10747fd05228034ed
    PrintIM	PrintIMVersion	0250
    XMP:XMP-acdsee	Caption	Beschreibung 1
    XMP:XMP-dc	Creator	nelle
    XMP:XMP-dc	Rights	Copyright 1
    XMP:XMP-dc	Subject	Suchwort1
    XMP:XMP-dc	Title	Titel1
    XMP:XMP-iptcExt	LocationShownCountryName	Land 1
    XMP:XMP-photoshop	Country	Land 1
    XMP:XMP-x	XMPToolkit	Image::ExifTool 10.09

    picture P1230116.jpg has

    Composite	AdvancedSceneMode	DMC-LX3 0 1
    Composite	Aperture	2.8
    Composite	BlueBalance	1.573055028463
    Composite	CircleOfConfusion	0.0064098689341582
    Composite	FocalLength35efl	60
    Composite	FOV	33.3985166785074
    Composite	HyperfocalDistance	9.12878037216378
    Composite	ImageSize	3776x2520
    Composite	LightValue	10.6147098441152
    Composite	Megapixels	9.51552
    Composite	RedBalance	1.83965844402277
    Composite	ScaleFactor35efl	4.6875
    Composite	ShutterSpeed	0.00625
    Composite	ThumbnailImage	(Binary data 8180 bytes, use -b option to extract)
    EXIF:ExifIFD	ColorSpace	1
    EXIF:ExifIFD	ComponentsConfiguration	1 2 3 0
    EXIF:ExifIFD	CompressedBitsPerPixel	4
    EXIF:ExifIFD	Contrast	0
    EXIF:ExifIFD	CreateDate	2015:07:15 17:26:55
    EXIF:ExifIFD	CustomRendered	0
    EXIF:ExifIFD	DateTimeOriginal	2015:07:15 17:26:55
    EXIF:ExifIFD	DigitalZoomRatio	0
    EXIF:ExifIFD	ExifImageHeight	2520
    EXIF:ExifIFD	ExifImageWidth	3776
    EXIF:ExifIFD	ExifVersion	0221
    EXIF:ExifIFD	ExposureCompensation	0
    EXIF:ExifIFD	ExposureMode	0
    EXIF:ExifIFD	ExposureProgram	2
    EXIF:ExifIFD	ExposureTime	0.00625
    EXIF:ExifIFD	FileSource	3
    EXIF:ExifIFD	Flash	16
    EXIF:ExifIFD	FlashpixVersion	0100
    EXIF:ExifIFD	FNumber	2.8
    EXIF:ExifIFD	FocalLength	12.8
    EXIF:ExifIFD	FocalLengthIn35mmFormat	60
    EXIF:ExifIFD	GainControl	0
    EXIF:ExifIFD	ISO	80
    EXIF:ExifIFD	LightSource	0
    EXIF:ExifIFD	MaxApertureValue	2
    EXIF:ExifIFD	MeteringMode	5
    EXIF:ExifIFD	Saturation	0
    EXIF:ExifIFD	SceneCaptureType	0
    EXIF:ExifIFD	SceneType	1
    EXIF:ExifIFD	SensingMethod	2
    EXIF:ExifIFD	Sharpness	0
    EXIF:ExifIFD	UserComment	Suchwort2; Suchwort3
    EXIF:ExifIFD	WhiteBalance	0
    EXIF:IFD0	Artist	nelle2
    EXIF:IFD0	Copyright	Copyright2
    EXIF:IFD0	DocumentName	Titel2
    EXIF:IFD0	ImageDescription	alt-text2
    EXIF:IFD0	Make	Panasonic
    EXIF:IFD0	Model	DMC-LX3
    EXIF:IFD0	ModifyDate	2015:07:15 17:26:55
    EXIF:IFD0	Orientation	6
    EXIF:IFD0	ResolutionUnit	2
    EXIF:IFD0	Software	Ver.2.2
    EXIF:IFD0	XResolution	180
    EXIF:IFD0	YCbCrPositioning	2
    EXIF:IFD0	YResolution	180
    EXIF:IFD1	Compression	6
    EXIF:IFD1	Orientation	6
    EXIF:IFD1	ResolutionUnit	2
    EXIF:IFD1	ThumbnailLength	8180
    EXIF:IFD1	ThumbnailOffset	10562
    EXIF:IFD1	XResolution	180
    EXIF:IFD1	YCbCrPositioning	2
    EXIF:IFD1	YResolution	180
    EXIF:InteropIFD	InteropIndex	R98
    EXIF:InteropIFD	InteropVersion	0100
    ExifTool	ExifToolVersion	10.09
    File	BitsPerSample	8
    File	ColorComponents	3
    File	CurrentIPTCDigest	c579864d2eb57cfe19e0ecff0d522f02
    File	EncodingProcess	0
    File	ExifByteOrder	II
    File	FileType	JPEG
    File	FileTypeExtension	JPG
    File	ImageHeight	2520
    File	ImageWidth	3776
    File	MIMEType	image/jpeg
    File:System	Directory	/Users/nd/Documents/Testfotos original/von Lumix/Download mit Finder/Photoshop/JPG nur geöffnet und gespeichert
    File:System	FileAccessDate	2016:02:27 21:36:54+01:00
    File:System	FileInodeChangeDate	2016:02:27 21:36:52+01:00
    File:System	FileModifyDate	2016:02:27 21:36:52+01:00
    File:System	FileName	P1230116.JPG
    File:System	FilePermissions	777
    File:System	FileSize	4096472
    File	YCbCrSubSampling	2 1
    IPTC	ApplicationRecordVersion	4
    IPTC	By-line	nelle2
    IPTC	Caption-Abstract	Beschreibung2
    IPTC	Category	Hauptkategorie2
    IPTC	City	Ort2
    IPTC	CodedCharacterSet	.%G
    IPTC	CopyrightNotice	Copyright2
    IPTC	Country-PrimaryLocationName	Land2
    IPTC	EnvelopeRecordVersion	4
    IPTC	Headline	Titel2
    IPTC	Keywords	Suchwort2; Suchwort3
    IPTC	ObjectName	Dateiname2
    IPTC	SupplementalCategories	Unterkategorie2
    MakerNotes:Panasonic	AdvancedSceneType	1
    MakerNotes:Panasonic	AFAreaMode	1 1
    MakerNotes:Panasonic	AFAssistLamp	2
    MakerNotes:Panasonic	AFPointPosition	0.5 0.5
    MakerNotes:Panasonic	Audio	2
    MakerNotes:Panasonic	BabyAge	9999:99:99 00:00:00
    MakerNotes:Panasonic	BurstMode	0
    MakerNotes:Panasonic	ColorEffect	1
    MakerNotes:Panasonic	ColorMode	0
    MakerNotes:Panasonic	ColorTempKelvin	0
    MakerNotes:Panasonic	Contrast	0
    MakerNotes:Panasonic	ContrastMode	0
    MakerNotes:Panasonic	ConversionLens	1
    MakerNotes:Panasonic	DataDump	(Binary data 8200 bytes, use -b option to extract)
    MakerNotes:Panasonic	FacesDetected	0
    MakerNotes:Panasonic	FilmMode	1
    MakerNotes:Panasonic	FirmwareVersion	0 2 2 0
    MakerNotes:Panasonic	FlashBias	0
    MakerNotes:Panasonic	FlashCurtain	0
    MakerNotes:Panasonic	FlashFired	1
    MakerNotes:Panasonic	FocusMode	1
    MakerNotes:Panasonic	ImageQuality	2
    MakerNotes:Panasonic	ImageStabilization	2
    MakerNotes:Panasonic	InternalSerialNumber	F340909190315
    MakerNotes:Panasonic	MacroMode	2
    MakerNotes:Panasonic	MakerNoteVersion	0132
    MakerNotes:Panasonic	NoiseReduction	0
    MakerNotes:Panasonic	NumFacePositions	0
    MakerNotes:Panasonic	OpticalZoomMode	1
    MakerNotes:Panasonic	PanasonicExifVersion	0291
    MakerNotes:Panasonic	PanasonicImageHeight	0
    MakerNotes:Panasonic	PanasonicImageWidth	0
    MakerNotes:Panasonic	ProgramISO	65535
    MakerNotes:Panasonic	Rotation	6
    MakerNotes:Panasonic	Saturation	0
    MakerNotes:Panasonic	SceneMode	0
    MakerNotes:Panasonic	SelfTimer	1
    MakerNotes:Panasonic	SequenceNumber	0
    MakerNotes:Panasonic	Sharpness	0
    MakerNotes:Panasonic	ShootingMode	6
    MakerNotes:Panasonic	TextStamp	1
    MakerNotes:Panasonic	TimeSincePowerOn	49.07
    MakerNotes:Panasonic	TravelDay	65535
    MakerNotes:Panasonic	WBBlueLevel	1658
    MakerNotes:Panasonic	WBGreenLevel	1054
    MakerNotes:Panasonic	WBRedLevel	1939
    MakerNotes:Panasonic	WBShiftAB	0
    MakerNotes:Panasonic	WBShiftGM	0
    MakerNotes:Panasonic	WhiteBalance	1
    MakerNotes:Panasonic	WorldTimeLocation	1
    Photoshop	IPTCDigest	756e1a09403a37f98f3ae9920a6564c6
    PrintIM	PrintIMVersion	0250
    XMP:XMP-acdsee	Caption	Beschreibung2
    XMP:XMP-dc	Creator	nelle2
    XMP:XMP-dc	Rights	Copyright2
    XMP:XMP-dc	Subject	Suchwort2; Suchwort3
    XMP:XMP-dc	Title	Titel2
    XMP:XMP-iptcExt	LocationShownCity	Ort2
    XMP:XMP-iptcExt	LocationShownCountryName	Land2
    XMP:XMP-photoshop	City	Ort2
    XMP:XMP-photoshop	Country	Land2

    In the File-Meta-Data Field of the WP Edit Media Page file P1230115.jpg reads

    array (
      'width' => 3776,
      'height' => 2520,
      'file' => 'P1230115.jpg',
      'sizes' =>
      array (
        'thumbnail' =>
        array (
          'file' => 'P1230115-150x150.jpg',
          'width' => 150,
          'height' => 150,
          'mime-type' => 'image/jpeg',
        ),
        'medium' =>
        array (
          'file' => 'P1230115-300x200.jpg',
          'width' => 300,
          'height' => 200,
          'mime-type' => 'image/jpeg',
        ),
        'medium_large' =>
        array (
          'file' => 'P1230115-768x513.jpg',
          'width' => 768,
          'height' => 513,
          'mime-type' => 'image/jpeg',
        ),
        'large' =>
        array (
          'file' => 'P1230115-1024x683.jpg',
          'width' => 1024,
          'height' => 683,
          'mime-type' => 'image/jpeg',
        ),
        'custom_header_image' =>
        array (
          'file' => 'P1230115-1920x270.jpg',
          'width' => 1920,
          'height' => 270,
          'mime-type' => 'image/jpeg',
        ),
        'featured_image' =>
        array (
          'file' => 'P1230115-225x225.jpg',
          'width' => 225,
          'height' => 225,
          'mime-type' => 'image/jpeg',
        ),
        'frontpage_image' =>
        array (
          'file' => 'P1230115-1920x550.jpg',
          'width' => 1920,
          'height' => 550,
          'mime-type' => 'image/jpeg',
        ),
        'widget_post_thumb' =>
        array (
          'file' => 'P1230115-75x75.jpg',
          'width' => 75,
          'height' => 75,
          'mime-type' => 'image/jpeg',
        ),
      ),
      'image_meta' =>
      array (
        'aperture' => '0',
        'credit' => 'nelle',
        'camera' => '',
        'caption' => 'Beschreibung 1',
        'created_timestamp' => '0',
        'copyright' => 'Copyright 1',
        'focal_length' => '0',
        'iso' => '0',
        'shutter_speed' => '0',
        'title' => 'Titel1',
        'orientation' => '0',
        'keywords' =>
        array (
          0 => 'Suchwort1',
        ),
      ),
    )

    and file P1230116.jpg reads

    array (
      'width' => 3776,
      'height' => 2520,
      'file' => 'P1230116.jpg',
      'sizes' =>
      array (
        'thumbnail' =>
        array (
          'file' => 'P1230116-150x150.jpg',
          'width' => 150,
          'height' => 150,
          'mime-type' => 'image/jpeg',
        ),
        'medium' =>
        array (
          'file' => 'P1230116-300x200.jpg',
          'width' => 300,
          'height' => 200,
          'mime-type' => 'image/jpeg',
        ),
        'medium_large' =>
        array (
          'file' => 'P1230116-768x513.jpg',
          'width' => 768,
          'height' => 513,
          'mime-type' => 'image/jpeg',
        ),
        'large' =>
        array (
          'file' => 'P1230116-1024x683.jpg',
          'width' => 1024,
          'height' => 683,
          'mime-type' => 'image/jpeg',
        ),
        'custom_header_image' =>
        array (
          'file' => 'P1230116-1920x270.jpg',
          'width' => 1920,
          'height' => 270,
          'mime-type' => 'image/jpeg',
        ),
        'featured_image' =>
        array (
          'file' => 'P1230116-225x225.jpg',
          'width' => 225,
          'height' => 225,
          'mime-type' => 'image/jpeg',
        ),
        'frontpage_image' =>
        array (
          'file' => 'P1230116-1920x550.jpg',
          'width' => 1920,
          'height' => 550,
          'mime-type' => 'image/jpeg',
        ),
        'widget_post_thumb' =>
        array (
          'file' => 'P1230116-75x75.jpg',
          'width' => 75,
          'height' => 75,
          'mime-type' => 'image/jpeg',
        ),
      ),
      'image_meta' =>
      array (
        'aperture' => '0',
        'credit' => 'nelle2',
        'camera' => '',
        'caption' => 'Beschreibung2',
        'created_timestamp' => '0',
        'copyright' => 'Copyright2',
        'focal_length' => '0',
        'iso' => '0',
        'shutter_speed' => '0',
        'title' => 'Titel2',
        'orientation' => '0',
        'keywords' =>
        array (
          0 => 'Suchwort2',
          1 => 'Suchwort3',
        ),
      ),
    )

    I have created two posts, the first with your first shortcode suggestion, the second with the second suggestion. Here is what I get as result:
    result post 1
    result post 2
    Unfortunatly the result is more or less empty. What went wrong?
    In the OpenOffice-textfiles
    FPT-ExifTool-MetaData.odt
    and
    WP-Metadata.odt
    I have marked the tags I have individually customized for the file P1230116.JPG
    I would like to automatically fill the appropriate WP-standard fields with the contents of meta data tags like in the table meta tags.ods.
    If possible, I’d like to fill the WP-Standard-Field “Description” with the content of multiple meta-tag-contents (i.e. title&caption&alt-text&Keywords&Categories&copyright).
    I would be very thankful, if you could get me startet on this project!

    Plugin Author David Lingren

    (@dglingren)

    Thank you for our update with the links to and details of your two sample images. I uploaded your images to my test site and I am able to access the IPTC, EXIF and XMP metadata without any problems. The images have many IPTC and EXIF values and their content is consistent with the “fastphototagger/ExifTool” results you posted. The only data not available are the “MakerNotes:Panasonic” values, which are not parsed out by the PHP exif_read_data() function that MLA uses.

    I cannot explain why your [mla_gallery] shortcodes in “result post 1” and “result post 2” are returning empty arrays; I cannot recreate this problem on my test system. Have you tried accessing some of the individual values, for example:

    [mla_gallery columns=1 post_parent=all posts_per_page=10 mla_caption="ObjectName: {+iptc:2#005+}<br>Headline: {+iptc:2#105+}<br>ByLine: {+iptc:2#080+}<br>Keywords: {+iptc:2#025+}"]

    Can you confirm what operating system, version of WordPress and especially what version of PHP you are using?

    Regarding the IPTC/EXIF mapping rules you posted in the Bildschirmfoto 2016-02-22 um 20.59.46.png screenshot:

    • I would not advise mapping the Name/Slug value unless you have a specific reason to do so. This is an internal field and WordPress will modify the value to make it unique.
    • The IPTC 2#015 category field is defined in the IPTC standard as “Max 3 characters of the subject of the objectdata, DEPRECATED”. The values in your images are, strictly speaking, invalid.
    • Mapping values into the Categories/Kategorien and Tags/Schlagworte taxonomies can cause a few issues if you use the same terms for posts/pages and attachments. Most MLA users prefer to use the Att. Catelories and Att. Tags taxonomies to organize attachments.

    Overall, the rules you have defined look fine and should work.

    In your second post you wrote “In the OpenOffice-textfiles FPT-ExifTool-MetaData.odt and WP-Metadata.odt“, but I do not see a link to the actual documents.

    In your table meta tags.ods table you wrote “If possible: change real filename to IPTC ObjectName on upload“. MLA does not provide any direct functions to alter the file name of uploaded items, and I do not recommend doing so. If you must rename your files, there are some hooks MLA provides that you can use. See the “MLA Custom Field and IPTC/EXIF Mapping Actions and Filters (Hooks)” section of the Settings/Media Library Assistant Documentation tab and look for the mla_upload_prefilter and mla_upload_filter hooks.

    You wrote “If possible, I’d like to fill the WP-Standard-Field “Description” with the content of multiple meta-tag-contents (i.e. title&caption&alt-text&Keywords&Categories&copyright).” If we can solve your metadata access issues you can use a Content Template like this to do that:

    template:[+title+], [+caption+], [+alt_text+], [+terms:attachment_tag+], [+terms:attachment_category+], [+iptc:2#116+]
    
    or
    
    template:[+iptc:2#105+], [+iptc:2#120+], [+iptc:2#025+], [+iptc:2#020+], [+iptc:2#116+]

    As I said, I do not yet know why you are having trouble accessing the metadata in the test images. Any additional information you can supply about your site configuration would be helpful. Thanks for your understanding and your patience.

    Hello David,
    WOW! You are really an active and thorough guy. Thank you for taking so much time on my problems!
    I will need some time to work through your tipps and right now I am not on my test-system, so I can’t provide you with informations to my system an configuration.
    For now only quickly the missing links to the files mentioned in my recent post:
    FPT-ExifTool-MetaData.odt
    WP-Metadata.odt

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update. Both of the links you posted go to WP-Metadata.odt. If you have a separate link for FPT-ExifTool-MetaData.odt, let me know.

    I look forward to more information in response to my suggestions and questions.

    Hi David,
    thank you for the hint!
    here’s the corrected link:
    FPT-ExifTool-MetaData.odt

    Meanwhile I looked up your profile an the plugin hompage at fair trade judaica. I appreciate your work there very much! My wife and me support the fair trade idea by choosing fair trade products as far as possible. In 2011 we had a short (10 Days) round trip through Isreal and Palestine, so we espacially like the approach to solve the middle east conflict by “opening real economic oppurtunities”. That’s great work, hold on!

    Hello David,

    here come some Informations about my system cofiguration:
    I am developing on my local machine (Apple Macbook Pro, late 2011) with Mac OS X 10.10.5. I’m running a local Apache Webserver under softaculous AMPPS v 3.0
    The active Apache-Version is 2.4.12 (Unix)
    The active PHP Version is 5.3.29 (I could change to 5.4, 5.5 or 5.6)
    The active Perl Version is 5.20.1
    mod_wsgi/3.5
    Python/2.7.9
    OpenSSL/1.0.1j
    Database-Client Version: libmysql – 5.6.23
    WordPress is 4.4.2
    active PlugIns:
    Custom Upload Dir
    Easy Watermark
    Media Library Assistant
    WP Category Permalink

    Sorry, but until now I ad no time available to test the tipps you gave. I will do so as soon as possible and give feedback. Thank you so much for your kind help!

    Niels

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your updates and for listing the plugins you are using on the site.

    I regret that the “Easy Watermark” plugin is stripping all of the IPTC/EXIF/XMP metadata from the images when it adds the watermark. I get the same empty arrays you reported when I test with watermarked images. There is some EXIF data available, but none of the values you are interested in are retained.

    You will have to restore the original images to get the metadata back. If you must watermark the images you can disable the “Auto Watermark” feature and watermark them manually after the upload and MLA mapping processes are complete. You can also define custom field mapping rules to retain the values you need before watermarking the images.

    Let me know what else I can do to help you recover and retain the metadata you need.

    Thank You for your quick analysis, great work!
    I think, my problem is solved by your answers.
    Next Weekend I will test MLA with Easy Watermark plugin deactivated and will try to contact the plugin author of Easy Watermark. I will ask him, if it is possible to launch a version, that leaves the MeaData unchanged. I will post his reply in this topic. So maybe you wait until then before closing this topic. If I have further question on MLA, I will post them in a new topic, OK?

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update; good luck with your further testing.

    If the Easy Watermark author cannot produce a version that retains metadata, I have developed a small custom plugin you can add to your system to do the job. The custom plugin uses the hooks MLA provides to save the original metadata and then put it back into the file after the watermark processing is done.

    I will leave this topic unresolved until I hear back from you. Thanks for your ongoing help with this issue.

    I did some testing now and I can confirm, that when Easy Watermark plugin is deactivated or set to not applying watermarks on upload, MLA works without problems. All of the MetaData are there and get mapped to the WP-fields correctly. Even if I watermark the images after the update and MLA field mapping progress is done, the WP fields for the images are left untouched. So your tipp does half of the job already.
    BUT: Easy Watermark produces new watermarked images in different sizes (small, large, thump, etc.) for displaying the images in different post types. In theses watermarked images (all sizes) almost all of the MetaData (EXIF, IPTC and XMP) -at least all of my individual data- are stripped from the files meta whereas the WP-fields still show the correct values. If a visitor copies or downloads a watermarked image file, he will get a file without copyright notice (except watermark) and further individual metadata like keywords, categories etc., wich is a great pity for me.
    I trust your additional custom plugin will work fine with the fullsize original image, but will it work with all the other sizes Easy Watermark produces?
    I started a new topic in the Easy Watermark support forum to find out, if Wojtec (the plugin author of Easy Watermark) can help.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update and for posting your topic in the Easy Watermark forum. I have added some comments there:

    Watermarking deletes EXIF, IPTC and XMP MetaData

    It should be possible to extend the mla-metadata-mapping-hooks-example.php.txt example plugin to restore metadata in post-upload watermarking and it may be possible to add metadata to the intermediate sizes; I would have to do some research to be sure.

    I will wait and see what response your Easy Watermark support topic generates. Thanks for taking it up with them.

    Plugin Author David Lingren

    (@dglingren)

    It has been a month since the last post in this topic. I assume you have found a solution to the metadata issues caused by the Easy Watermark plugin.

    I am marking this topic resolved, but please update it if you have any problems or further questions regarding the topic.

    Hi David, I just load MLA plugin, it is absolutley awesome, abut I don’t understand, how to configure them. It soooooooo complex like nuclear submarine 🙂 I need JUST USE DESCRIPTION FROM IMAGE TO WORDPRESS IMAGE DESCRIPTION. Automatically after uploading images. But, I tried some settings, it doesn’t work for. I am not able to set it correctly.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your question. You can find my more detailed response in the other topic you posted to:

    Importing Photoshop IPTC data into WordPress

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘How to use exif_read_data and ALL_IPTC’ is closed to new replies.