Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

This module finds visually similar images in your Drupal Media library without requiring manual tagging or external services. It analyzes images locally, generating a "visual fingerprint" for each and allowing you to display related images through Views.

Displays "related images" on your site. This module analyzes your image library to find visuals that look similar to one another, helping keep visitors engaged by suggesting relevant visual content without requiring manual tagging.

Features

The Similar Images module uses mathematical analysis to determine visually related content within your Drupal Media library. Instead of relying on manual tags, taxonomies, or external AI services, this module calculates a unique "visual fingerprint" (hash) for your images and stores it locally.

Key functionalities include:

  • Automated Similarity Detection: Once set up, the system automatically finds images that look like other images based on color composition, structure, and shapes.
  • Native Media Integration: It adds the necessary storage fields directly to Drupal core's standard Image Media type out-of-the-box.
  • Bulk Processing via Drush: Includes a robust Drush command to generate visual hashes for all your existing historical images in one go.
  • Views Integration: The primary way to display similar images is through Drupal Views. The module provides new Views arguments or filters allowing you to create blocks like "More images like this" on media/node pages.
  • Multiple Algorithms: (Future potential depending on implementation) The module supports different comparison algorithms to fine-tune how strictly "similarity" is defined.

When to use this module: Use this when you have a large library of photographic content (e.g., a portfolio, news site, or e-commerce store) and want to encourage users to keep browsing by showing visually similar items automatically, without the editorial burden of manually curating "related content" lists.

Post-Installation

After installing the module normally, there are two critical steps to make it functional:

Generate Hashes (Required): The module needs to analyze your existing images. Run: drush similar-images:generate-hashes. This command will process your image files and populate the newly created hash field on your Media entities. This task can be heavy -- consider moving to cron with queue workers or at minimum batch processing.

Create a View: Go to Structure > Views and create a new View (usually a Block view listing Media items). You will need to add a "Contextual Filter" (Argument) provided by this module, usually passing the ID of the currently viewed image. The View will then use the stored hashes to calculate and display the closest visual matches.

// @todo add info about

Additional Requirements

Drupal Core Media: This module relies on the core Media system.

Similar projects

Most similar image projects in the Drupal ecosystem rely on external, third-party APIs (like Google Vision or AWS Rekognition) which often incur costs or require sending your data off-server.

This module differentiates itself by doing everything locally and natively. It uses PHP-based hashing algorithms on your own server, keeping your data private and avoiding external subscription fees.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Jan 2026
Latest release
7 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Core Release date
1.0.x-dev Dev Jan 11, 2026