Here’s a fix I did:
– Open jquery.photoswipe.js
– Go to parseThumbnails
function in about line 130+
– Insert var imgTag = $.parseHTML($photo[0].innerHTML);
before `item = {
src: photoSrc,
w: img.width,
h: img.height,
author: $photo.attr(‘data-author’),
title: $photo.attr(‘title’),
msrc: $(‘img’,$photo).attr(‘src’)
};`
– Then change title: $photo.attr('title'),
to title: imgTag[0].alt
This fixed the captions bug for me.