Hi @batracy,
I checked the core WordPress gallery and it seems to work in the same fashion. I’m not sure exactly how selectable image sizes would work programmatically, though it is something I’ll look into.
That’s interesting, because if I place a single image in a post and set it’s link settings to media file, I get the original image as the link. So it would seem there is inconsistency within the wordpress core. Galleries are one way, and single images another.
Actually, can you try it with the core Gallery block and let me know what you get? Image blocks are built quite a bit differently.
Gives me the same result as what I get with your Block Gallery plugin. Seems that wordpress thinks that galleries should be limited to 1024px on the long edge.
I had the same result when I tried to get the original media file. I’ll look into alternatives, but I’m not sure how else to get the original file from the gallery mechanism that ships with Gutenberg.
I found a workaround on github as long as it’s not fixed in core:
https://github.com/WordPress/gutenberg/issues/13851#issuecomment-472477759
When you change the query string to:
var galleryLinks = document.querySelectorAll(".blockgallery--item > figure > a, .blocks-gallery-item > figure > a");
it also works for block gallery. I put it in my theme footer file, just below <?php wp_footer(); ?>.