• Resolved Grumbledook

    (@grumbledook)


    This is by far the best lightbox plugin for my wordpress neeeds, so thank you for developing it.

    The EXIF data already looks pretty good but I was wondering if it is possible to customise the EXIF display in the following ways.

    I’ve changed the aperture label “f/” to “??/” by replacing it in the code that is outputting the f/ in the file lightbox-photoswipe/src/LightboxPhotoSwipe/ExifHelper.php on line 169.

    return 'f/' . round($fstop,1);

    Presumably this will get overwritten every time there is a update? Is there a better way for me to change this so it’s more permanent?

    Would it also be possible to display any other EXIF fields, such as the name of the lens being used? If not I can just put extra info in the image description so not a big deal. If I could customise extra fields then this could be useful.

    Thanks again for the great implementation.

    • This topic was modified 4 months, 1 week ago by Grumbledook.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    Yes, when you change the code of the plugin, this will get overwritten with the next update. The recommended way to overwrite output for the EXIF display is the filter lbwps_caption_exif, similar to the other filters as described in the FAQ (I just forgot to mention, that there is also lbwps_caption_exif). So you could use str_replace() to replace f/ by ??/ in the output.

    However, I can apply your change to the next update as well.

    About other EXIF fields: unfortunately EXIF is not a simple key-value-list as one might expect (also see here: https://exiftool.org/TagNames/EXIF.html). Some manufacturers do include the lens name, others don’t and some use EXIF ID 0xfdea (Lens) for this others require to use EXIF ID 0xa433 (LensMake) and 0xa434 (LensModel).

    In fact I don’t have any example image in my collection where the lens name is included. So if you have some sample images for me to test, this would be very helpful. Then I add this as additional backend option along with a styled output for the caption.

    Plugin Author Arno Welzel

    (@awelzel)

    In addition: even my camera adds the lens name to the RAW file, after converting it to JPEG the information is lost, only aperture etc. will stay. So I have no chance to even test this yet, sorry!

    Plugin Author Arno Welzel

    (@awelzel)

    Ok, I managed to identify the information – unfortunately the PHP EXIF extension does not support it, so I did take some research how to extract that. I will provide an update which includes the nicer f-stop indicator and optional lens name as well.

    Plugin Author Arno Welzel

    (@awelzel)

    Version 5.3.1 adds lens names as additional option and the modified f-stop symbol.

    Thread Starter Grumbledook

    (@grumbledook)

    Amazing, thanks Arno.

    I’d assumed that the lens name was included in all the exif. I just updated the plugin on the new site I’m working on and I’ve got an old image on there from my Canon 40D and it’s now displaying the lens used.

    It’s also kept the ?? symbol.

    Much appreciated!

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.