How to add comments to image galleries
You can add comments to individual gallery images with WordPress by linking each image to its attachment page and enabling comments for the media item. For comments inside a lightbox, threaded image discussions, or client proofing, use a gallery plugin instead.
- 01Choose where comments should appear
- 02Review your discussion settings
- 03Link gallery images to attachments
- 04Allow comments on each image
- 05Check the attachment page
- 06Use a gallery comments plugin
What you need
- A WordPress site with administrator access
- A gallery page or post containing the images
- A theme that displays attachment pages and comments
Choose where comments should appear
WordPress has a built-in route, but it puts each image's comments on its media attachment page rather than inside the gallery lightbox. This is suitable for a small gallery when visitors can open a separate page for each image.
If visitors need to comment beside the image without leaving the gallery, or if you need image-by-image feedback and threaded discussions in a lightbox, plan to use a gallery plugin.
Review your discussion settings
Go to Settings → Discussion and decide whether commenters must be logged in, whether comments should require approval, and whether threaded comments should be enabled. WordPress also provides comment moderation and blocklist controls from this screen.
Do not rely on the general setting alone. Individual media attachments have their own comment setting, so you must check the images you want to discuss.
Link gallery images to attachments
Edit the page or post containing the Gallery block. Select the gallery, then set its link behaviour to Attachment page. WordPress describes an attachment page as an image page that can contain the image, caption, description, and comment field.
Do not choose Media file, Enlarge on click, or None if you want visitors to reach the comment form. Those options open the file, show a lightbox, or remove the link instead.
Allow comments on each image
Go to Media → Library, open an image, and find the Discussion box. Turn on the option to allow comments, then update the media item. If the box is missing, open Screen Options in the upper-right corner and enable Discussion.
Repeat this for every image that should accept feedback. WordPress documents this as the control for turning comments on or off on a media attachment page.
Check the attachment page
Open the published gallery in a logged-out browser and click an image. Confirm that it opens an attachment page and that the comment form appears for the correct image. Submit a test comment and check that it enters moderation if approval is enabled.
This is where the manual route often breaks: new WordPress installations have attachment pages disabled by default since WordPress 6.4, and themes may not display attachment comments correctly. If the link redirects to the image file, or the page has no comment form, the theme or site configuration needs changing before this method will work.
Use a gallery comments plugin
For the fast route, use Envira Gallery with its Comments functionality. It is intended for comments attached to individual gallery images, with threaded discussions and moderation controls, so visitors can leave feedback without depending on the theme's attachment-page template.
Create or edit the gallery, enable comments for the gallery or its images in the gallery settings, then test the comment form and approval workflow. This is the better fit for photographers, proofing galleries, and sites where comments must appear within the gallery experience.
Let Envira Gallery do it
Adds threaded, moderated comments to individual gallery images for photographers and site owners focused on visual feedback.
Sources
- wordpress.org /documentation/article/settings-discussion-screen/?utm_sourc…
- wordpress.org /documentation/article/gallery-block/?utm_source=openai
- wordpress.org /documentation/article/edit-media/?utm_source=openai
- make.wordpress.org /core/2023/10/16/changes-to-attachment-pages/?utm_source=ope…
Questions
- Can WordPress add comments to individual gallery images without a plugin?
- Yes, but the native method uses attachment pages rather than comments inside the gallery lightbox. Link the Gallery block to attachment pages, then enable comments for each image from Media → Library → Edit Media. The method depends on attachment pages being enabled and your theme displaying the attachment comment form.
- Why does my gallery open the image file instead of showing comments?
- Your gallery is probably linking to the media file or opening images in a lightbox instead of linking to attachment pages. Edit the Gallery block and choose Attachment page. On new WordPress installations, attachment pages are also disabled by default from WordPress 6.4, so that site-level change may be required too.
- Why is the comment form missing from an image attachment page?
- The comment form may be disabled for that media item, hidden in the Media Library editor, or omitted by your theme's attachment template. Open the image under Media → Library, enable the Discussion box through Screen Options if necessary, and allow comments. If the form still does not appear, use a gallery plugin or have the theme template checked.
- Can I moderate comments on gallery images?
- Yes. Image comments use WordPress's normal comment controls, so you can require approval, restrict commenting to registered users, enable threaded replies, and manage comments from the Comments screen. Review Settings → Discussion before publishing the gallery, particularly if the images will attract public traffic or spam.