• Resolved batracy

    (@batracy)


    When using the link settings and setting it to “media file”, it is currently setting it to a default size of large. I would like it to be the original file. Is it possible to add an option to select the size when setting the link setting to media file?

    Hope that makes sense.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Rich Tabor

    (@richtabor)

    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.

    Thread Starter batracy

    (@batracy)

    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.

    Plugin Author Rich Tabor

    (@richtabor)

    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.

    Thread Starter batracy

    (@batracy)

    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.

    Plugin Author Rich Tabor

    (@richtabor)

    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(); ?>.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Link settings issue’ is closed to new replies.