Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Responsive Image Formatter Tools (RIFT)

Security covered Under active development 135 sites

RIFT enhances responsive image setup in Drupal by providing tools and field formatters to implement modern HTML responsive image techniques. It allows defining responsive image "View Modes" and applying them to media fields, offering flexibility for developers through Twig functions and a plugin-based architecture.

RIFT provides Quality-of-Life improvements for setting up and maintaining responsive images in Drupal websites. The module offers a comprehensive toolkit for implementing responsive image strategies using modern HTML techniques.

Key Features

  • Define "Responsive Image View Modes" that implement responsive image strategies using srcset/sizes or picture elements
  • Apply responsive image formatting to media fields (images) attached to content entities via field formatters
  • Plugin-based architecture for extensibility (RiftSource and RiftMediaSource plugins)
  • Twig functions and services for developers to implement custom responsive image solutions
  • Integration with image cropping and focal point tools
  • Placeholder mode for testing RIFT view mode configurations.
  • Image Token (?itok) support.

Field Formatters are applied to Media Reference field, instead of Image field. This architecture allows supporting some advanced use cases which is not possible in other modules.

Components

RIFT consists of:

  1. Core Module (rift): The main functionality including:

    • Field formatters for media entity references
    • Twig extension for template integration
    • Plugin systems for source and media source handling
    • Configuration management for responsive image strategies
  2. Submodules:

    • RIFT UI (rift_ui): Enhanced user interface for RIFT configuration. Highly recommended module for configuring RIFT. It provides advanced validation and auto-healing of configuration.

Field Formatters

RIFT provides the following field formatters:

  • Rift Media Picture: Formats media entity reference fields to use responsive picture elements
  • Rift Media Picture with Fallback: Similar to the above but includes fallback options. This can be used to show images using Rift Media Picture and for other media types, it would fallback to configured media entity view mode.

Recommended Modules

  • image_widget_crop: For Manual Crop support.
  • focal_point: For setting point of interest on an image.
  • crop: Used by Image Widget Crop.
  • ace_editor: Provides enhanced configuration editing experience. However, while using "RIFT UI", ace_editor doesn't provide any added benefit.

Installation

Install as you would normally install a contributed Drupal module. For further information, see Installing Drupal Modules.

Configuration

Before configuring the module, you should develop a responsive image strategy for your site. See the Responsive Image Design Guide for guidance.

Documentation Resources

For Developers

RIFT provides a Twig filter called rift_picture that allows you to generate responsive picture markup directly in your Twig templates:

{# Using the rift_picture filter with a media entity #}
{{ node.field_image.0.entity|rift_picture({
  sizes: "120w 320w 640w 1024w 1920w",
  aspect_ratios: "1x1 16x9 16x9 4x3 4x3",
  quality: {
    1x: "80 80 70 70 60",
    2x: "40 40 40 40 40"
  },
  types: ["webp", "avif", "jpeg"]
}) }}

The filter accepts a media entity and a configuration array with the following options:

  • sizes: Widths for different breakpoints
  • aspect_ratios: Aspect ratios for each size
  • quality: Image quality settings for both 1x and 2x pixel density
  • types: Image formats to generate (in order of preference)

See the complete documentation for more details.

Browser Support

The responsive image techniques used by RIFT are supported by all modern browsers. Older browsers may display fallback images when configured.

Maintainers

A rich user interface to manage responsive sizes

No need of create image styles or run any drush commands. Create/Manage responsive sizes via a rich user interface provided by "rift_ui".

Drupal 9–11

Ask your assistant about Responsive Image Formatter Tools (RIFT)

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

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
25
Tracked since
Jul 2023
Latest release
3 months ago
Releases (12 mo)
3 ▼ from 14
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
2.0.0-rc1 Pre-release 9–11 Jul 7, 2026
2.0.0-beta1 Pre-release 9–11 Jun 23, 2026
2.0.0-alpha2 Pre-release 9–11 Feb 25, 2026
2.0.0-alpha1 Pre-release 9–11 Oct 1, 2025
2.x-dev Dev 9–11 Jul 3, 2025
1.4.6 Stable 9–11 Apr 26, 2025
1.4.5 Stable 9–11 Apr 26, 2025
1.4.4 Stable 9–11 Apr 21, 2025
1.4.3 Stable 9–11 Mar 30, 2025
1.4.2 Stable 9–11 Mar 30, 2025