Gallery Custom Links


Gallery Custom Links allows you to link images from galleries to a specified URL. Tested with WordPress Gallery, Gutenberg, the Meow Gallery and others. The official page is here: Gallery Custom Links.


Two fields are added to your images, in your Media Library: Link URL and Link Target (but also, Link Rel and Arial Label). If, at least, the Link URL is set up, this image will link to that URL every time it is used within a gallery. Lightbox will be automatically disabled for those images.

To do this, the Gallery Custom Links needs to analyze/rewrite your content. Depending on your WordPress, you can pick the most appropriate method (known as engine).

  • HtmlDomParser: Very reliable. It will rewrite your HTML so that the links are hardcoded.
  • DiDom: Same as HtmlDomParser but faster. However, your HTML needs to be perfectly valid.
  • Javascript: This is the fastest, but the links won’t be hardcoded. Only the visitor will experience the links.


It currently works with the native WP Gallery, the Gutenberg Gallery, and the Meow Gallery. It should actually work with any gallery plugin using the ‘gallery’ class and Responsive Images (src-set). Let me know if you would like more galleries to be supported, it should be easy.


You can optimize (run the plugin only on the pages where you need it) and support more galleries (through CSS classes) easily by using filters. To know more about this, visit the official page, here: Gallery Custom Links.


The motivation to build this plugin came from my users who had issues trying to use WP Gallery Custom Links. I realized that this plugin was working extremely well with the standard gallery, but would require too much rewriting for Gutenberg and other galleries, hence the creation of this plugin. I hope it will help.

Languages: English.


  • The fields.


  1. Upload gallery-custom-links to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress


July 4, 2024
I’ve been using Gallery Custom Links for my photography portfolio, and it’s exactly what I needed. Being able to link my gallery images to high-res versions or to specific blog posts about each shoot has made my site much more interactive and engaging. The plugin is lightweight and hasn’t caused any conflicts with my theme or other plugins. The only small improvement I’d suggest is the ability to open links in a lightbox, but overall, it’s a fantastic tool that does its job perfectly.
April 25, 2024
Simple but very useful plugin and it works great. Thanks to the developer.
February 21, 2024
There is really little to add to the title of this review other than to congratulate the Developer Mr. Jordy Meow. As mentioned in the title of this review, the Gallery Custom Links WordPress plugin is really well designed and coded, it also turns out to be very streamlined, lightweight and packed with lots of features and most importantly it works perfectly (mind you, do not confuse the errors that can be caused by an incompatibility with obsolete versions of PHP, because using the updated versions of PHP and supported by this plugin, although I have been using this plugin for a long time, I have not yet encountered any errors in this plugin).Basically with Gallery Custom Links this simple but very powerful WordPress plugin, allows you to link images from galleries to a specified URL and works with many types of galleries such as: WordPress Gallery, Gutenberg, the Meow Gallery and many more. Oh I forgotโ€ฆ it is virtually completely free but there is also a paid Professional version available (optionally) that adds, for those who need it, support for: Enhanced UI: FiltersYou can filter the Media Library by unlinked media items. Enhanced UI: Quick EditIn the Media Library, you can click on a button and instantly modify the link. Much faster! To finish I still give my compliments to the Developer Mr. Jordy Meow and I can only recommend you to try it because it is really an Excellent plugin for WordPress and I am very proud to have completely translated it into Italian! Greetings and have a nice day.
Read all 195 reviews

Contributors & Developers

“Gallery Custom Links” is open source software. The following people have contributed to this plugin.


“Gallery Custom Links” has been translated into 5 locales. Thank you to the translators for their contributions.

Translate “Gallery Custom Links” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.


2.2.0 (2024/06/03)

  • Add: Updated to the latest libs.
  • Info: If you like the plugin, your reviews are welcome here. Thank you ๐Ÿ™‚

2.1.9 (2024/04/06)

  • Add: Javascript method to rewrite the links. It is the fastest method, but the links won’t be hardcoded. Only the visitor will experience the links.

2.1.8 (2023/10/23)

  • Fix: Addressed and prevented timeouts caused by infinite loops associated with ob levels.
  • Fix: Repaired malfunctioning NekoUI components for improved user experience.

2.1.7 (2023/09/10)

  • Add: Support for the new version of the Meow Gallery 5 (it will require the version 5.0.1 of the Meow Gallery, which is not released yet but coming soon).

2.1.6 (2023/06/11)

  • Update: Lighter plugin.
  • Update: Fresh packages.
  • Update: Removed useless dependencies.

2.1.5 (2022/10/24)

  • Update: No need for jQuery anymore.

2.1.4 (2022/10/05)

  • Add: Some files were missing for the libraries autoload.

2.1.3 (2022/09/06)

  • Add: Added column in the Media Library (to edit faster).

2.1.1 (2022/07/27)

  • Fix: Faster UI.
  • Fix: Increased compatibility.

2.1.0 (2022/05/17)

  • Fix: Avoid useless logs.

2.0.9 (2022/03/18)

  • Fix: Compatibility with the latest version of Gutenberg Gallery.

2.0.8 (2022/03/18)

  • Update: Latest versions of DiDom and HTML Dom Parser (might be better and faster).
  • Update: Latest version of Neko UI.

2.0.6 (2021/09/30)

  • Update: Fix for PHP 7.4+.

2.0.5 (2021/08/31)

  • Update: Enhanced security and updated common librairies.

2.0.4 (2021/07/05)

  • Update: Refresh the UI libraries and common librairies to ensure compatibility with other plugins.

2.0.3 (2021/03/01)

  • Update: New Meow Common (which is needed for compatibility with other plugins).


  • Fix: Autoload was missing.


  • Fix: There were a few issues in this new version.
  • Update: New modernized admin.


  • Add: Remove warnings for PHP 7.4.
  • Update: New versions of DiDom and the Simple HTML DOM Parser.


  • Add: Because we love the W3C, the title has been added to the link.


  • Fix: Avoid errors in the admin.
  • Fix: Add another way to resolve the image ID if none found (, let’s see how it goes.


  • Add: Label for CTA buttons.
  • Fix: Moved the position of the CTA buttons in the DOM.


  • Add: CTA Buttons for Meow Gallery, Native Galleries and Gutenberg Galleries.
  • Add: Filter to… filter which images are actually managed by the plugin ๐Ÿ™‚
  • Fix: Hopefully, the Reusable Blocks aren’t broken anymore in the editor (I couldn’t replicate the bug on this new version).


  • Add: This was asked to me a lot, so I have adding the settings in order to change the parameters of the plugin easily. It will be much easier to make it faster now.


  • Fix: Simpler and probably better REST detection.


  • Fix: Attempt to fix the way autoload is working.


  • Fix: Avoid analyzing the html content if the parser returned a boolean or an empty string.


  • Add: Rel can now be set to nofollow.


  • Update: Defaults set to Output Buffering + HtmlDomParser. Those settings work for most.


  • Update: Using HtmlDomParser fully (which should avoid broken HTML). It is possible to override the plugin hidden options to switch to different mode, but I am trying to find a mode that works for 99% of the users first.


  • Update: Avoid interfering at all with all Ajax/Rest requests.
  • Info: Sorry for the last bunch of updates, some way of modifying HTML works for some, and not for others, and I am still trying to find a solution which works for everyone.


  • Update: Back to OB, maybe there should be an option for that.
  • Update: Get all the images of the page/post content instead of within specific containers previously.


  • Update: Not using OB anymore; going through the content filter (this behavior can be changed internally), better and faster this way.
  • Fix: Avoid issues with static variables which are not registered on older PHP versions.


  • Fix: Now works with the most tenacious lightboxes.
  • Update: The way the HTML was modified to make sure it is compliant.


  • Add: Filter to let the user enables/disables the plugin depending on conditions. Check the official page to know more about this: Gallery Custom Links.


  • Fix: Support images embedded in a few layer of tags before the link tag.
  • Add: Added a class on the a-tag, for the ones who would like to add some styling to linked images. The Meow Lightbox is already handling this, by avoiding showing a zoom cursor when hovering images.
  • Add: Compatibility with extra galleries is made through a filter (which anybody can use) and the file mgcl_extra.php.
  • Info: If you like the plugin, your reviews are welcome here ๐Ÿ™‚ Thank you!


  • Fix: Now works with thumbnails in src.
  • Update: Optimization (does not regenerate pages which aren’t impacted by changes).
  • Update: DiDom from 1.13 to 1.14.1.


  • Update: If the ID of the Media is not found in the HTML, it will resolve it through the DB from the filename.


  • First release.