Save the Google Analytics file (gtag.js / analytics.js) locally to be able to cache it for longer than 2 hours for a better PageSpeed score!
This plugin for WordPress automatically add the rel="lightbox[ID-OF-THE-POST]" and recovers the image title.