Author Topic: Where to place <img alt="Image of Alternated image" src=???> text with ExifTool?  (Read 3637 times)

BrianP

  • Jr. Member
  • **
  • Posts: 24
Alt text is supposed to be huge in SEO. zen_folio has an extremely dumbed down csv interface to it. They download a csv file which you then populate and beam back up.

EXIF tags have no obvious place for the "Alt-Attribute" as they call it. IPTC has nothing. XMP has something called 'AlternateTitleText', but:
`ExifTool  -XMP:AlternateTitleText=XMP_AlternateTitleText My.JPG`  =>  Warning: Tag 'AlternateTitleText' does not exist

In the manual, 1-at-a-time gui, I spiked this field with "Alt-Attribute_tag_here_zzzzz" and looked for it in the view_source and it is not there (after refreshing). [ http://bit.ly/1Of2NLX ] I have to wonder how the search engines are getting to it.

I would very much like to bypass the harebrained csv kludge and manually updating thousands of images. Where can ExifTool write to where Google/bing/yahoo/??? will see it and recognize it as some type of alt-text field and, most importantly, use it in indexing?


StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 2516
According to Zenfolio's editing description page
Quote
By default the Attribute is set to be the same as the photo title.

Try setting the TITLE tag in your picture, then uploading it and seeing if that works.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14748
    • ExifTool Home Page
`ExifTool  -XMP:AlternateTitleText=XMP_AlternateTitleText My.JPG`  =>  Warning: Tag 'AlternateTitleText' does not exist

I doubt this is where you want to write it, but this command would work if you weren't using an old version of ExifTool.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

BrianP

  • Jr. Member
  • **
  • Posts: 24
According to Zenfolio's editing description page
Quote
By default the Attribute is set to be the same as the photo title.

Try setting the TITLE tag in your picture, then uploading it and seeing if that works.

the folks at zen__folio have a stated policy of doing a 3 tiered lookup for the image title splashed on the web page:

1) IPTC Object Name  << Exiftool: -ObjectName
2) IPTC Headline         <<  Exiftool: -Headline
3) EXIF Image Title     << Exiftool: -Title

I do not need all 3 for a title. I could reappropriate (misappropriate) either the headline or title to stash the SEO stuff.

I want to stash something like "Genre=People  Category=Portrait  Subcategory=Groups"  roughly corresponding to the 3, hierarchical menu zen labels as SEO.

Photoshop appears to stash them in XMP: Category <=> zen Category,
XMP: SupplementalCategories LIST <=> [zen Subcategory (portraits), zen Subcategory Detail (groups)]
THey show up in the file -> file_info -> categories tab
I use this arg to Exiftool to set them:
-Category=\"XMPCat_People\" -SupplementalCategories=\"XMP_SC1_Portrait\" -SupplementalCategories=\"XMP_SC2_Groups\"
I use the weird values so I can tell then the pop up where they came from.


Or, they seem to fit into the IPTC slots:
Exiftool  -IntellectualGenre=People  -SubjectCode=Portraits  -Scene=Groups  (OR -Scene=\"Portraits;  Groups\" )
in Photoshop, they show up in file ->file_info, iptc_tab -> Intellectual_genre=People and
IPTC scene code: = "Portraits;  Groups" (OR IPTC Subject code=Portraits and IPTC Scene Code=Groups)

Phil,
Is there any standard or preference to using the XMP or the IPTC for this info? I have no  idea where zen stashes it, but I have to believe that Google and the others would be able to figure out what GENRE=PEOPLE means. Is it possible that they have it in some Javascript function or an Ajax call so they can see who is asking for it (and track them)?



BrianP

  • Jr. Member
  • **
  • Posts: 24
`ExifTool  -XMP:AlternateTitleText=XMP_AlternateTitleText My.JPG`  =>  Warning: Tag 'AlternateTitleText' does not exist

I doubt this is where you want to write it, but this command would work if you weren't using an old version of ExifTool.

- Phil

I am using Exiftool 9.82 (latest=9.92). It has not been broken so I have not upgraded it. And, I have the funky .ExifTool_config with EXIF:ShutterCount defined to counter adobe's dastardization of Nikon's nomenclature. I will upgrade and hope for backward compatibility!

Why is there NOT an EXIF:Image_Alt_Text tag?  The "ALT" is used in the HTML tag containing the image source, but it is an attribute of the picture. The photographer knows best what would be the most appropriate text substitute for the actual image, not some web putz.  It's default value can be scraped from tags contained within the image. The original and most authoritative source should be in the pic with the title, caption, genre, etc...!

There is that XMP:AlternateTitleText.  From your response, it sounds as though this is earmarked for some other purpose? And it is part of a structure which complicates its setting and retrieval.

exiftool.exe -ImageAltText="EXIF_Image_Alternate_text for my full Pink moon picture"   My.JPG would be handy!

If it just happened to be prestidigitated into existence in ET 9.93, most would probably assume the EXIF Poobahs had yet another divine inspiration and start using it! :)

    Brian


Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14748
    • ExifTool Home Page
Hi Brian,

Phil,
Is there any standard or preference to using the XMP or the IPTC for this info?

In general, XMP would be the preference.  The older IPTC IIM is being phased out.

I am using Exiftool 9.82 (latest=9.92). It has not been broken so I have not upgraded it.

XMP:AlternateTitleText is a PRISM 3.0 tag.  From the ExifTool version history:

Apr. 11, 2015 - Version 9.92

  - Added support for PRISM pmi and prm tags, and updated to PRISM 3.0


Quote
Why is there NOT an EXIF:Image_Alt_Text tag?

EXIF has not been designed with people in mind.

Quote
There is that XMP:AlternateTitleText.  From your response, it sounds as though this is earmarked for some other purpose? And it is part of a structure which complicates its setting and retrieval.

I don't know what it is for, but the PRISM tags probably aren't very well supported by other software, partly due to the complexity you mention.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

BrianP

  • Jr. Member
  • **
  • Posts: 24
Phil,

This time, you have really done it! I just upgraded to 9.92 and it works better than the old one!

The NEW version, 9.92 at least understands the ShutterCount and correctly fails to find one:
P:\br1\sxsw.2015\sx-2015.0318\done>exiftool -S -ImageAltText -ShutterCount -ImageNumber -ver sx-2015.0318-245010.jpg
9.92
ImageNumber: 245010   < adobe deplorably destroys ShutterCount and instead writes this
------------------

It _Claims_ to have updated the ShutterCount which is (ordinarily) a non-writable Nikon tag and is destroyed by the alimentary termini behind photoshop:
P:\br1\sxsw.2015\sx-2015.0318\done>exiftool -S -ShutterCount=245010 -ImageAltText="ICMP_IntellectualGenre=People SubjectCode=Portrait Scene=Groups  XMP_Category=People SupplementalCategories=Portrait,Groups"  sx-2015.0318-245010.jpg
    1 image files updated
------------------

The ShutterCount actually seems to have stuck!  Good thing I ate my Lucky Charms this morning!
P:\br1\sxsw.2015\sx-2015.0318\done>exiftool -S -ShutterCount -ImageNumber -ImageAltText  sx-2015.0318-245010.jpg
ShutterCount: 245010
ImageNumber: 245010
ImageAltText: ICMP_IntellectualGenre=People SubjectCode=Portrait Scene=Groups  XMP_Category=People SupplementalCategories=Portrait,Groups
--------------------------

Something new has slunk into the ET config file!
P:\br1\sxsw.2015\sx-2015.0318\done>find  c:/bin -maxdepth 2  -iname .Exift*  -print0   | xargs -0 diff
114c114
<     # XMP tags may be added to existing namespaces:  Mangled by BPB
---
>     # XMP tags may be added to existing namespaces:
118d117
<         ImageAltText => { Groups => { 2 => 'Author' } },

--------------------------

But the Real, Christmas in April Surprise is:
P:\br1\sxsw.2015\sx-2015.0318\done>c:/bin/bak/exiftool.982 -config c:/bin/bak/.ExifTool_config -S -ImageAltText -ver sx-2015.0318-245010.jpg
9.82
ImageAltText: ICMP_IntellectualGenre=People SubjectCode=Portrait Scene=Groups  XMP_Category=People SupplementalCategories=Portrait,Groups


THE -IMAGE_ALT_TEXT EVEN WORKS ON THE OLD VERSION OF EXIFTOOL WITH NO CONFIG MONKEYING!

Anybody using ExifTool can now get The_Photographer's_Original_Alt_Text rather than relying on a web schmo to use something as unoriginal as the title.

It's Alive!

    Brian


Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14748
    • ExifTool Home Page
Hi Brian,

Glad you're having a good day. :)

Just FYI, ExifTool will read any XMP tags from a file, even if they aren't pre-defined.  So the config file is only needed for XMP tags when writing.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

BrianP

  • Jr. Member
  • **
  • Posts: 24
ImageAltText  Custom XMP tag install summary:
=================================

This ImageAltText tag provides a place to store the Photographer's inspired alternate text which best embodies the essence of an image to be added to the <img> tag's <alt> text.  Otherwise, the title, filename or <NULL> are often used.

1) Find .ExifTool_config file
2) Find line containing the string "NewXMPxmpTag"
3) Copy and paste that line
4) Change "NewXMPxmpTag"  to "ImageAltText" on the new, copied line to DEFINE the new tag

Try (with your path to .ExifTool_config):
>  exiftool -config c:/bin/.ExifTool_config  -ImageAltText="AIT_TEXT" sx-2015.0318-244896.jpg
    1 image files updated

If it updates the file, the new, custom tag is defined correctly.

Now, try it without the -config option:
> exiftool  -ImageAltText="AIT_TEsT_2" sx-2015.0318-244896.jpg
    1 image files updated

If this still works, then exiftool is finding the right config file and you are DONE!!!

If you karma is so depleted that you see this:
> exiftool  -ImageAltText="AIT_TEsT_2" sx-2015.0318-244896.jpg
Warning: Tag 'ImageAltText' does not exist
Nothing to do.
 

your .ExifTool_config file is not being found.  The easiest way to fix this (IMHO) is to find your exiftool.exe and move your .ExifTool_config file to that directory

C:\bin>which exiftool.exe
c:\bin\exiftool.exe

C:\bin>find c:/bin -name .ExifTool_config -maxdepth 1
c:/bin\.ExifTool_config   <<  Both exiftool.exe and .ExifTool_config are in the same directory. Simplest setup!


============  YOUR PERL SCRIPT ================
Above the "use Image::ExifTool" line, insert this BEGIN line:
BEGIN { $Image::ExifTool::configFile = 'c:/bin/.ExifTool_config' }
use Image::ExifTool qw(:Public); 


This should work (with _YOUR_ get.exif.pl script which extracts ImageAltText):
>get.exif.pl -gs sx-2015.0318-244896.jpg  | grep -i ImAgEaltTEXt
ImageAltText            =>  AIT_TEsT_2

>exiftool  -a -S    sx-2015.0318-244896.jpg  | grep ImageAltText:
ImageAltText: AIT_TEsT_2


Now you can package your Shakespearean prose with your Adamsesque pixels and hope your web schmo doesn't just check the "USE TITLE" box!