• Resolved totzo

    (@totzo)


    Hi,

    first off, thanks for all your work on this great free plugin!
    I’ve been playing with a template to grab certain camera exif data and insert it into image captions. So far this has worked perfectly for all the tags that mla recognises.

    I noticed that some values I’m interested in aren’t included in the Field-level enhanced EXIF CAMERA values – for example, ExposureMode returns an integer value of 0,1 or 2 when you set the template to “exif:ExposureMode” but there currently isn’t a way to use “exif:CAMERA.ExposureMode” to interpret this into the corresponding strings (auto, manual etc).

    I was wondering if there is a way I could make use of fields like this without having to edit the plugin? Apologies if I’ve missed something in the documentation!

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

    (@dglingren)

    Thanks for the positive feedback regarding MLA and for your question.

    The Field-level enhanced EXIF CAMERA values implement the more popular values in a more convenient format for most applications. The “ExposureMode” value is one of many “enumerations” in the EXIF Documentation. For many of these the translation to a string value is not obvious to me and I haven’t worked on them.

    You can easily add your own code to support them by using the hooks MLA provides to add custom substitution parameter prefixes and data sources. You can adapt the code in the “MLA Substitution Parameter Hooks Example” plugin for this purpose.

    That said, the ExposureMode value is straightforward and I will add it to the next MLA version. I have uploaded a new MLA Development Version dated 20210622 that contains the new value. You can find step-by-step instructions for using the Development Version in this support topic:

    PHP Warning on media upload with Polylang

    It would be great if you could install the Development Version and let me know if it works for you. Thanks for inspiring this new MLA feature.

    Thread Starter totzo

    (@totzo)

    Thanks! I installed your dev version and it works perfectly, here’s a screenshot of it in use: https://ibb.co/LZZzFz6

    The template I used to insert the values into image captions for this example:

    template:<i style="margin-right: 5px" class="dashicons dashicons-camera"></i> [+camera+] (with a [+exif:CAMERA.LensModel+]) (Lens at [+focal_length+]mm) (using ISO [+iso+]) (and a [+exif:CAMERA.ExposureMode+] Exposure of) ([+exif:CAMERA.ShutterSpeed+] sec) (at f[+exif:CAMERA.FNumber+])

    It’s a bit scrappy and I should probably set it up so that if the exif values aren’t present it copys the image alt text or something.

    • This reply was modified 3 years, 5 months ago by totzo.
    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update with the good news regarding the latest Development Version. Thanks as well for the link to your example, which looks great.

    You wrote “I should probably set it up so that if the exif values aren’t present it copys the image alt text or something.” You have already discovered content templates, but I want you to know that you can nest templates so you can substitute something like ALT Text for the exif values using the “Choice” element. Let me know if you need more specific guidance for that.

    I am marking this topic resolved, but please update it if you have problems or further questions regarding the CAMERA values or content templates. Good luck with the rest of your application.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Unsupported Exif Tags’ is closed to new replies.