INTRODUCTION

The client hints module implements the ideas presented in https://httpwg.org/http-extensions/client-hints.html and/or https://developers.google.com/web/updates/2015/09/automating-resource-se... in a decidedly less sophisticated way, while working in any modern browser that supports Javascript as well as with non-HTML consumers.

Following the ideas in the aforementioned articles, the contextual size & resolution of images as displayed in the browser is calculated on the client (this is implemented via Javascript by default) and images are served in an appropriate - because only slightly larger than displayed - image style.

The module itself doesn't do anything. You can either enable the submodule client_hints_image_formatter and configure where you want this technique to work, or the submodule client_hints_everywhere, which hijacks pretty much any occurrence of image rendering to deliver images via the client hints method.

Consult above links on why and how this might fit your need or taste rather than responsive image styles.

To submit bug reports and feature suggestions, or to track changes:
https://www.drupal.org/project/issues/client_hints

REQUIREMENTS

This module requires the following modules:

Furthermore, the following Javascript library must be installed:

INSTALLATION

CONFIGURATION

The module has no menu or modifiable settings. There is no configuration. The module will, however, probably not work well (or at all) in combination with Responsive image styles (https://www.drupal.org/docs/8/mobile-guide/responsive-images-in-drupal-8) so proceed at your own peril. The image formatter plugin provided by the submodule client_hints_image_formatter can be configured as any field formatter plugin on the field view display settings of an entity (see https://www.drupal.org/docs/8/administering-drupal-8-site/managing-conte... for details, only available if Drupal core's Field UI module is enabled).

Project information

  • caution Seeking new maintainer
    The current maintainers are looking for new people to take ownership.
  • Project categories: Media
  • Created by jan.stoeckler on , updated
  • shieldStable releases for this project are covered by the security advisory policy.
    There are currently no supported stable releases.

Releases