Skip to content

Kokoa Image Self Link

Every image in your posts can be enlarged with a click, including the ones you uploaded without a link.


What it does

It looks through your published posts for images that are not inside any link and wraps them in a link to their own file. Images that already link anywhere are left alone. That way a lightbox plugin such as Simple Lightbox can open them at full size.

It works in two ways. On the public site, unlinked Image blocks get their link as they are displayed, without changing the database, and those already using WordPress's native enlarge-on-click are respected. And from Tools you can make the change for real in bulk: first an analysis that changes nothing and, if you are happy with it, the update across all affected posts.

Why it matters

A blog with years of content mixes linked and unlinked images, depending on how each one was inserted. The lightbox only works on linked ones, so readers can enlarge some photos and not others, for no obvious reason. Fixing it by hand post by post is not realistic when there are hundreds of images.

Image from a WordPress post enlarged in a lightbox after being linked to its own file
Image pending · A post on the public site with an image enlarged in the lightbox after clicking it. File name: kokoa-image-self-link-1.png
Preview run of unlinked images with the results table and the button to apply changes
Image pending · Analysis screen (Dry Run): notice with the number of unlinked images, the Imagen / Post / Ver table and the Aplicar cambios button. File name: kokoa-image-self-link-2.png

How it works

  1. Under Tools → Kokoa - All Images Self Link, press Analizar imágenes (Dry Run) (Analyse images (Dry Run)).
  2. Review the table, 20 rows per page: every unlinked image with its post and a link to view it live.
  3. If it all looks right, press Aplicar cambios (Apply changes) and confirm.

Requirements

  • A lightbox plugin, e.g. Simple Lightbox, so the images can be enlarged.
  • The PHP DOM extension.

Want it on your WordPress site?

We install it, go through the preview run with you and fit it to the lightbox your site uses.