Black Friday

65% off Annual plans

25% off Lifetime · 10 per week

Ends December 2

Get the deal

Made in Europe

9 min read

How to Add Social Share Buttons to a WordPress Image Gallery

Add social share buttons to a WordPress image gallery for free, see what each network shows, and fix previews that pick the wrong photo.

Building Engaging Image Galleries with Social Sharing in WordPress

You post a wedding gallery on Sunday. On Monday, a guest taps the share button on the photo of the bride’s grandmother dancing and sends it to the family WhatsApp group. Everyone in that group sees your photo, with your site’s address under it.

To add social share buttons to a WordPress image gallery, you need a gallery plugin that puts them on each image. In Modula, the gallery plugin we make, they’re free:

  1. Install Modula from Plugins → Add Plugin.
  2. Open your gallery in Modula → Content.
  3. Click Interact, then switch on the networks you want under Share.
  4. Share one photo to yourself and check what arrives.

Turning them on takes a minute. What the friend sees takes more care, and that’s most of this guide.

Add social share buttons to your gallery

Modula’s share buttons come with the free plugin (160,000+ active installations on wordpress.org, October 2026).

  1. Go to Modula → Content and open your gallery. For a new one, click + and add photos with + Add.
  2. Click Interact in the left rail.
  3. Under Share, switch on the networks you want: X, Facebook, WhatsApp, LinkedIn, Pinterest or Email. All six are off in a new gallery, and the buttons appear as soon as one is on.
  4. Set the look with Icon color, Icon size, Space around each icon and Collapse on desktop.
The Share settings under Interact in the Modula editor, with X, Facebook, WhatsApp, LinkedIn, Pinterest and Email on, then Icon color, Icon size, Space around each icon and Collapse on desktop

The editor saves as you go. To put the gallery on a page, click Embed and paste the shortcode (like [modula id="12"]) into a Shortcode block, or use the Modula block (more ways).

One exception: a Video gallery has no Share settings.

How the buttons look on computers and phones

  • Collapse on desktop is on by default: the icons hide behind one share button per photo until someone clicks it. Switch it off to show the icons on hover.
  • On phones and tablets (992 px wide or narrower), the icons always sit behind one share button. They open in a pop-up with a black background.
  • Space around each icon starts at 10 px. Keep it at 8 px or more, or the buttons get hard to hit on a phone.

Good to know

Don’t pick black icons. On phones they sit on that black pop-up and disappear. White, the default, can vanish on snow or beach shots on a computer. A bright color from your logo usually reads on both.

A gallery where one photo's share menu is open with X, Facebook, Pinterest, Email and download icons, while the other photos show a single share button.

What each network gets, and what your friend sees

Modula’s buttons share one photo, not the whole gallery. What travels is a link: your page’s address plus the gallery’s and the photo’s IDs. Modula prints Open Graph tags, the preview code networks read, for that exact address, so the post can show the photo your visitor picked.

NetworkWhat Modula sendsWhat the friend should see
FacebookThe linkA preview card: photo, title, caption
LinkedInThe linkA preview card: photo, title, caption
XThe link and the image titleThe title, then a large image card
WhatsAppThe image title and the linkThe title, the link and a preview
PinterestThe link, the image file and the image titleA Pin of the photo, with the title as its description
EmailYour subject and messageA plain email

A click on any of them lands at the top of your page, unless you turn on Photo links (below).

Notice what’s missing: X, WhatsApp and Pinterest get the image title only, never the caption. Without a title they send no text at all, and the preview card falls back to the gallery’s title.

The share addresses Modula built on our test gallery: Facebook and LinkedIn get the link, X and WhatsApp the link and title, Pinterest the link, image file and title, Email your subject and message.

So title every photo for a post, not a file name. “First dance under the oak tree” gets clicked; “DSC_0412” doesn’t. Click a photo in the editor preview to edit it.

The title doesn’t have to show on the page (Show image title in Layout → Captions is off by default), but it goes out with every share. More in titles and captions.

Sharing on WhatsApp

WhatsApp is often the share button people actually use. Your photo lands in a chat with a friend or a family group, recommended by someone they know. And WhatsApp has more than 3 billion monthly users (Meta, April 2025).

On a phone, the button opens WhatsApp with the title and link already typed in, and the visitor picks a chat. On a computer, WhatsApp offers its desktop app or WhatsApp Web.

Whether the friend sees a photo or a bare link depends on WhatsApp’s preview rules (as of October 2026). The image must be under 600 KB and at least 300 px wide, and the description shouldn’t be empty. Modula sends your original upload, so the 600 KB cap is the one that bites. Even when you meet every rule, WhatsApp says previews are “not guaranteed.”

Three camera originals of 17.7 MB, 12.3 MB and 4.8 MB against WhatsApp's 600 KB preview limit; a 2,048 px copy weighs 319 KB.

Pinterest

Pinterest gets the image file itself, so it pins the photo directly, with the title as the description. It recommends a 2:3 ratio (1000×1500 px) and warns that taller images might get cut off. Portrait shots close to 2:3 fit best.

Sharing by email

When a visitor picks Email, their mail app opens with your subject and message filled in. Once Email is on, set them under Interact → More settings → Email. Replace the default subject while you’re there: “Check out this awesome image !!” reads like spam.

Put %%image_link%% in the message, and Modula swaps it for the shared link. It doesn’t add a link on its own, so without the placeholder the email can arrive with no link. Send yourself one to check.

Why a share preview shows the wrong photo (and how to test it)

A share preview usually shows the wrong photo, or none, because of your SEO plugin, a cached preview, an oversized file or a missing title:

  • Your SEO plugin’s tags. Modula prints its preview tags first in the page’s code. Yoast SEO prints its own set further down, with the page’s featured image, and other SEO plugins usually do the same. No network says which set wins. If you see the featured image, the SEO plugin won, so make it a good one (in Yoast: Social media appearance).
  • A cached preview. Facebook caches what it reads from a link, and it caches each image by its address. After a fix, re-scrape the link. Replacing a photo? Upload it under a new file name, or Facebook keeps the old one.
  • A file that’s too big. The share image is your original upload, not the 2,560 px copy WordPress makes of big images. A 10 MB JPEG straight from the camera is over the limit everywhere except Pinterest. For public galleries, upload web-sized exports.
  • No title or caption. The card then shows the gallery’s title, often an internal name like “June edits v2”, and the page’s excerpt, or nothing.
The page head of a shared photo: Modula's Open Graph tags on lines 5 to 10 point to the shared photo, Yoast SEO's on lines 23 to 32 point to the page's featured image.

Here are the limits that matter, from each network’s own docs (as of October 2026):

NetworkRecommended imageLargest file
Facebook1200×630 px or larger (1.91:1)8 MB
LinkedInAt least 1200×627 px (1.91:1)5 MB
X2:1 large image card5 MB (X’s older card docs)
WhatsAppAt least 300 px wideUnder 600 KB
Pinterest1000×1500 px (2:3)20 MB

Test one share in two minutes

  1. Open the gallery page in a private window. Share one photo to yourself on WhatsApp (“Message yourself”) or by email.
  2. Check the preview: right photo, right title, a caption?
  3. Paste the link from that message into Facebook’s Sharing Debugger. It shows the tags Facebook read and the image it picked. After a fix, click Scrape Again.
  4. For LinkedIn, paste the same link into Post Inspector.
  5. Tap the link and see where you land.

Give each photo its own link

Modula’s Photo links gives every photo its own address, so a shared photo opens in the lightbox instead of at the top of your page. Without it, the friend has to scroll and hunt. In a 300-photo wedding gallery, they won’t.

Photo links is Modula’s SEO Deeplink feature, in the Business and Agency plans (October 2026 pricing). Turn on Lightbox → More settings → Photo links → Give each photo its own link.

Photo links in Modula's Lightbox settings, with Give each photo its own link on and the Link slug field
  • Shares open on the photo. The shared link gets an extra #… part that tells the lightbox which photo to open.
  • Visitors can copy a photo’s address. While the lightbox is open, the address bar shows the photo’s own link, ready for an Instagram DM, a Threads post or Bluesky.
  • The slug sticks. Link slug (default modulagallery) is part of every photo link. Change it later and links already shared stop working.

One caveat: we couldn’t confirm that Facebook keeps the # part when someone clicks a post, so test one. Details in the Photo links KB article.

The lightbox Share button

Any Modula Pro plan adds a Share button to the lightbox toolbar, under Lightbox → More settings → Lightbox & Links → Show toolbar. It’s off by default. It opens a Share window with the networks you switched on in Interact, plus a box to copy the address.

Lightbox & Links in Modula's lightbox settings, with Show toolbar on and the Share button switch off

The catch: it shares the image file’s address, not your page. Whoever clicks lands on a bare image file, with no gallery, no menu and no way back to you. If you want visits, stick with the photo buttons plus Photo links.

What about Instagram, Threads and Bluesky?

Modula’s share buttons don’t cover Instagram, Threads, Bluesky, Telegram or Reddit, and the photos get no copy-link button.

Instagram is the one people ask about. Its sharing tools are built for iOS and Android apps, with no web link a site’s button could send a photo to (as of October 2026). The Scriptless Social Sharing readme puts it flatly: “Instagram does not support social sharing buttons.”

Threads and Bluesky do accept shares from websites, just not from Modula’s buttons. Two workarounds:

  • Turn on Photo links, so visitors can copy a photo’s address from the lightbox and paste it anywhere.
  • Add a page share plugin with Threads and Bluesky buttons for the page as a whole.

Modula’s Instagram extension (Trio and up) works the other way round: it pulls your Instagram posts into a gallery on your site.

Image share buttons vs. WordPress social sharing plugins

Image share buttons and page share plugins do different jobs, and most gallery sites are better off with both.

  • Modula’s buttons share one photo. Six networks, no share counts, and plain links that load no Facebook, X or Pinterest scripts. Free.
  • AddToAny (300,000+ installs, October 2026) shares the page. It covers far more networks, including Bluesky, Threads and Mastodon, with share counters and its own image buttons.
  • Highlight and Share (700+ installs, October 2026) lets readers share a highlighted quote, and images to Pinterest or their device’s share menu. Its text sharing covers Threads, Bluesky, Mastodon and Telegram.

A simple split works: page buttons on the post or portfolio page, Modula’s buttons on the photos. If you turn on AddToAny’s image buttons too, check a gallery page so your photos don’t get two sets.

The AddToAny Share Buttons page on WordPress.org: it shares posts and pages to Facebook, Bluesky, Mastodon, Threads and more, with 300,000+ active installations.

Sharing with clients is a different job

If you’re sending a finished shoot to a client, you don’t want share buttons. You want a private gallery.

  • Password Protect (Trio and up, as of October 2026) puts a password on the gallery.
  • Image Proofing (Business and Agency) lets clients mark their favorites right in the gallery.

Leave Share off there. Turn it on for your public portfolio, where every share is free advertising.

Keep your name on photos that travel

A shared photo can be saved and reposted by anyone, so your name should travel inside it. Most reposts are harmless, but some drop your credit or claim the shot as theirs.

  • Watermark (Business and Agency, as of October 2026) writes your logo into the image file, so share previews and reposts carry it. Think of it as branding, not only protection: whoever likes the photo can trace it to you. See how to watermark photos.
  • Image Guardian (Trio and up) blocks right-click and dragging photos off your site. More in how to protect images from theft.
  • Image Licensing (Trio and up) adds a license to your images, also as structured data search engines can read. It doesn’t sell licenses. See the image licensing guide.
A sunset meadow photo with a winged logo and www.mysite.com watermarked in the corner

Frequently asked questions

No paid plan needed: all six network switches and every icon setting work in Modula’s free plugin. The lightbox Share button needs any Modula Pro plan, and Photo links needs Business or Agency.

Yes. Every Modula button shares one photo, and the post’s preview shows it. A click lands at the top of your page, unless Photo links is on. Then the lightbox opens on that photo.

That’s Modula’s Collapse on desktop setting, on by default. Click the icon to open the networks, or switch the setting off to show them on hover. Phones always show one button, and black icons vanish on the black pop-up there.

Most likely your SEO plugin’s tags won. Yoast SEO and Modula both print preview tags, and Modula doesn’t switch Yoast’s off. Paste the link into Facebook’s Sharing Debugger to see which image it picked, and click Scrape Again after a fix.

No to both. Modula’s buttons are plain links with no Facebook, X or Pinterest scripts, so the networks only see visitors who click. To see what shares bring in, check social referrals in your analytics.

Make your next gallery
the one people remember.