Buy me a coffee

Image file name to Caption in Gallery Grid

#1. First, you need to find Gallery Section ID.
In my example, it is:

section[data-section-id="66ed2c3e2f063471736e09c1"]

Image File Name To Caption In Gallery Grid 1 Min

#2. Use this code to Code Injection > Footer.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script>
jQuery(document).ready(function($){
    $('section[data-section-id="66ed2c3e2f063471736e09c1"] figure.gallery-grid-item').each(function(){
        var text = $(this).find('img').attr("alt");
        console.log(text);
        $(this).append('<div class="alt-caption">' + text + '</div>');
    })
})
</script>
<style>
.alt-caption {
    font-size: 16px;
}
</style>

Image File Name To Caption In Gallery Grid 2 Min

#3. Result

Image File Name To Caption In Gallery Grid 3 Min