Support » Fixing WordPress » 2.5 gallery: link thumbnail to original image?

  • Resolved mnogueir


    Hello there!

    Using the new gallery shortcode, is there any way to link directly from the thumbnail to the original image, instead of opening another page with the medium sized image?


Viewing 6 replies - 1 through 6 (of 6 total)
  • Just found this info somewhere:

    it’s very easy to set lighbox with the 2.5 galleries:

    just install lightbox and lightbox-auto.

    then activate them and edit media.php in the wp-includes dir:

    The line number 394 is as follows in 2.5:

    $link = wp_get_attachment_link($id, $size, true);

    change it to:

    $link = wp_get_attachment_link($id, $size, false);

    and it should work!

    I tried, and it did work. Maybe this could be coded as an option on the admin?

    This solution is unclear – can anyone clarify it?

    When you say “install lightbox and lightbox auto,” which plugins are you referring to? I found only one called Lightbox JS v2.0.4. Is that the correct lightbox plugin? What is lightbox auto?

    I am hating this thumbnail that clicks over to a medium sized image. Ugh!


    Perhaps there is an easier solution for me…is there a way to change the max width and height of the medium image? I’m looking around but can’t figure it out.


    Sorry, I copyed and pasted from another article. FOrget about the lightbox plugins. The solution to skip the medium sized image is just the change to the media.php file…

    changing that line in media.php does work, but it’s far from ideal because as soon as wordpress is updated, that modification is lost. There must be a better solution.

    Who marked this thread resolved?

    I just released a plugin, gallery-plus, that can add the lightbox attribute to the gallery. You need to install the lightbox 2 plugin also. I personally use version 2.6.0.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘2.5 gallery: link thumbnail to original image?’ is closed to new replies.