• For some reason, the most recent photo I added to the gallery does not go to the link I assigned it (which is a link to the corresponding blog post). It just goes to a large image of the photo: https://winediplomats.com/wp-content/uploads/2022/05/IMG_20220422_202943489-1-1-scaled.jpg All the other photos work and go to their corresponding blog post except this one. This has happened before, but last time it happened to all the photos in the gallery and it appeared to be connected with an update. However, it was later fixed after another update. This time, I don’t know what to do because it’s still a problem after 5 days. I’ve tried adding the photo again to my media library, but the same thing happens. Please advise what I should do?

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 15 total)
  • Hi @winediplomats

    Are you using a default WordPress gallery, or a gallery from a theme or plugin?

    Thread Starter winediplomats

    (@winediplomats)

    I believe it’s the default gallery. My theme is called Parabola. The weird thing is all the other photos in the gallery work as I want with links to blog post. It’s only the photo that I uploaded last week that’s been the problem.

    Hi @winediplomats

    I assume you are adding the link by clicking on a single image in the gallery, clicking on the link icon in the tool bar, and adding the link that way (see attached image)?

    https://www.awesomescreenshot.com/image/26853232?key=6493611c9a84fce4eb1acd0beb8240aa

    Currently your first image is linking to https://winediplomats.com/img_20220422_202943489-1/, which is the URL to an image in the media library.

    Thread Starter winediplomats

    (@winediplomats)

    No. The way I make my gallery is through the media library. So when I click on add media, you have the option to add a gallery, so I manually pick each photo I want in the gallery. If it’s a photo I want to use in my gallery, I give a link to the photo in my library where it says “Link URL” (after clicking on the photo and it goes to attachment details where you can edit the photo).
    The code looks like this: [gallery columns="4" ids="2667,2613,2612,2574,2573,2469,2468,2467,2417,2396,2385,2381,2333,2332,2323,2294"] I can’t click and edit individual photos in the gallery itself. I have to do it in the media library.

    I know there must be better ways to make a gallery, but that’s how I do it. One difference I see with the photo I uploaded that won’t go to the link is that the photo was changed to “scaled” version of the photo while my previous photos were not. The original version was uploaded for the other photos in the gallery. So I think it’s an issue of how the photo was uploaded. It’s been different for a couple of weeks now.

    Hi @winediplomats ok, so you’re using the original gallery option in the Classic Editor.

    I’ve recorded a quick screencast creating a gallery on a local test environment.

    https://www.awesomescreenshot.com/video/8820015?key=4137028bed16849762b94c77e73376ba

    When I create the gallery, the only linking options I see are the ability to link the gallery items to the Attachment Page, the Media File or None, but no option to link to any external pages.

    Do you have some customisation on your site that enables this option?

    Thread Starter winediplomats

    (@winediplomats)

    This is what the photo that doesn’t link looks like when I try to edit it. I’ve also included one that does work. In the second photo, there is an option to add a Link URL at the bottom on the right.

    https://docs.google.com/document/d/1QTylbylICJOQaQLoOk0Td0lu_en5PrNz/edit?usp=sharing&ouid=107242733359552505067&rtpof=true&sd=true

    The only plugin I think that affects my photos is EWWW Image Optimizer but I’ve already spoken with their support staff and they say it has nothing to do with their plugin and when I disabled, I tried uploading the photo again. It still didn’t link like the others.

    Hi @winediplomats

    Ok, this is helpful. First off I would point out that the ability to edit the Link URL and the rest of those fields is definitely something related to a plugin, and not the default functionality of WordPress. For example, this is what I see on one of my images on a clean WordPress install.

    https://tinyurl.com/yxk876c9

    However, your screenshot has given me some info to work with, specifically the URL of the page you want to link the image to, in this case: https://winediplomats.com/sagratino/.

    When I try to visit that page in the browser, it shows me a Not Found message, so it looks like that page is not available under that slug sagratino on your WordPress site.

    Are you able to verify that there is a page with that slug?

    Thread Starter winediplomats

    (@winediplomats)

    If you click on Blog, you can find the article there that it’s supposed to link to and it works fine there.

    This is the address that I copied from the article page: https://winediplomats.com/sagrantino/

    I just noticed that the slug that you gave is misspelled, so that’s probably why it’s not working. But it’s spelled correctly in my media library.

    Ah, yes, my apologies.

    Can you ask you to try something? Create a new blog post for the Wine Review: Sagrantino from Italy & Chile post, and change the slug to sagrantino-2, then use that link in the image, and see if that works.

    Thread Starter winediplomats

    (@winediplomats)

    I will be adding a new post anyway in the next couple of days, so I can try using that link in the photo and also try adding a new photo to see if it goes to that link too.

    Thanks.

    Thread Starter winediplomats

    (@winediplomats)

    Just to see what would happen, I used the link from an old post from 2 years ago that is no longer featured in the wine review gallery on the home page and put it as the URL of the photo, but the same thing happened. It went to a bigger version of the photo and not to the old post.

    @winediplomats in that case, there seems to be a problem with that specific image. Have you tried deleting it, re uploading it, and applying the link?

    Thread Starter winediplomats

    (@winediplomats)

    Yes. I have. It didn’t change anything.

    I’ve also just added a new photo to the gallery to link to my new post and it’s doing the same thing.

    My guess is that it has something to do with the way my photos have been uploading recently. Ever since a few weeks ago, all the photos I upload change to “scaled” version of the photo while my previous photos kept the original file of the photo. That’s the main difference I can see when I click on the photos to see the attachment details.

    In addition, the photo appears on the left when I click on attachment details while the photo doesn’t appear in the previous photos. Similarly, when I add the photo in the blog post, it used to come as a really tiny version of the photo (with dimensions at 1 X 1), so I had to manually enter the dimensions in the code, but now it appears as a small scaled version photo, but not tiny like before. I always thought there was something wrong with the adding media feature because the photo would automatically appear so small that I couldn’t see and I would have to adjust it in the code, but I grew accustomed to doing it that way. Now, I can see the photo when I upload it in the blog post, but it’s a scaled version and it won’t the link won’t work in the gallery.

    Do you know if there’s a way to change how a photo is uploaded? OR should we just try to find another way to do a gallery?

    As I’ve mentioned previously, the ability to link an image to a URL the way you have shown me in your screen is not a default WordPress function.

    Do you have some code or a custom plugin that is enabling this? I tested EWWW and WP Optimize, and none of these plugins seem to add those fields.

    My guess is that whatever is making that functionality possible on the media items, contains the bug.

    Thread Starter winediplomats

    (@winediplomats)

    Thanks for all your help troubleshooting this problem. I did find that I have a plugin called Gallery Custom Links. Perhaps some other update is not compatible with it because I don’t think Gallery Custom Links has been updated in a while. I will try their support.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Gallery Image Link Not Working’ is closed to new replies.