Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

ThumbHash

No security coverage Under active development

Generates a ThumbHash for every image file and stores it with the file. A ThumbHash is a placeholder of about 30 characters that clients decode into a blurred preview while the image loads.

Features

  • Adds a thumbhash field to file entities.
  • Generates the hash when an image file is saved for the first time or replaced.
  • Downscales with an image style first, so it works with GD and ImageMagick. SVG is skipped.
  • Can generate the hashes during cron instead of on save.
  • Drush command for existing files.

Post-Installation

No configuration is needed. Run drush thumbhash:generate once for existing images (options: --limit, --force, --queue).

Settings are at /admin/config/media/thumbhash: the image style used for downscaling, and whether to generate the hashes during cron.

The module does not display the hashes. Read them with:

  • PHP: $file->get('thumbhash')->value
  • JSON:API: the thumbhash attribute of file resources
  • Core REST: thumbhash[0].value, once the entity:file resource is enabled

The hash describes the original image, so it won't match image styles that crop.

Additional Requirements

Similar projects

  • Blurhash: calculates a BlurHash on every render and doesn't store it.
  • Image Blurry Placeholder: adds a tiny background image in the core image formatters. It provides no hash for APIs.

Ask your assistant about ThumbHash

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

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
Oct 2026
Latest release
14 hours ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core PHP Release date
1.0.0-alpha1 Pre-release 11 Oct 26, 2026