Hello, thanks for letting me know!
I am using your plugin and altered some of the functionality to suit best my needs, specially to have as less impact on page load times. So I will share with you, maybe some ideas will be good for you
1) I have minified all frontend scripts and enqueue only one file. The order of scripts in than file is important in that case very much. It’s possible to rely on minify plugins, but it’s much better solution to have already minified file. You can include option to use minified file.
2) Additionally I load that script by jquery ajax call($.getScript()) when it’s needed and when page is initially loaded. To determine when it’s needed I have used https://www.npmjs.com/package/lozad (which I use already for lazy loading pictures onsite) and bind it to .sgdg-gallery-container (so every gallery on page is observed). Initially I had idea to lazy load images from gallery, but it looks better to just lazy load script which then starts loading images. It was very important because it loaded a lot of files even if user didn’t reach gallery. The only downside is when there 2 and more galleries (script can be downloaded twice – you have to use $.ajaxSetup({cache: true}); to load jquery ajax call only once))
3) Because I have dequeued scripts I had to hard code sgdgShortcodeLocalize configuration before loading minified script.
4) in shortcode.js added to configuration widowLayoutStyle: ‘center’ which has 3 options. It can be for example = justified. It would be better to justify last image, looks much more better ( it was implemented by justified flickr plugin I have told you before.) I have used just center, because didn’t finish with justifying last image.
5) Also in shortcode.js I have added targetRowHeightTolerance:0.15 . It makes not every raw equal, and I like this look better, I recommend to try it.
And about some bugs I have noticed:
1) when there are two galleries of pictures on one page: autoloading only works for 1 of them, not always the same (bug in shortcode.js).
2) sgdgShortcodeLocalize is added twice when there 2 galleries.
2) on frontend some of admin scripts and maybe styles(I don’t remember) are loaded.
3) I wanted to disable adding hash (unique picture address) to browser address, but it’s possible only by removing code in js, would be great when it was an option.
About links for pictures as permanent links: I haven’t worked on that, as for now it’s like it was
I have noticed that you used caching for storing as transient sgdg_hash which is used then to get the gallery. So as continuation of idea from previous posts, maybe it would be great to cache whole response for minimal time when the links for images as 100% still reachable.
If you need some more details let me know, I will gladly help.