Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Image Library Widget

Security covered Maintenance fixes only 27 sites

This module provides an image upload widget that allows users to either upload a new image or select an existing one from a predefined media library. The library itself can be configured to display images of a specific media type, and the widget's browse functionality is powered by a customizable Views display.

Provides an image widget that allows users to upload or choose an existing image from a library with a predefined set of images. Each widget can be configured to show images within a media type.

How it works?

The widget extends the core's image widget but adds also an "image browser". The "image browser" is actually a view that exposes image entries from the media type that was configured with that widget. The user can use the standard upload feature, or they can select a pre-uploaded image by clicking in the "image browser".

Dependencies

  • PHP >=7.1.0
  • Media (core)
  • Views (core)

Limitations

  • Currently, the module supports only image fields with a single value (cardinality 1). Support multi-value image fields to be implemented in #3103574.
  • It's not possible to configure the "image browser" (the view) with a pager but without Ajax being enabled as navigating to a different widget page should be done without reloading the page where the widget is rendered.

Configuration

  • Create one or more new media types by visiting `/admin/structure/media/add`. Set the "Media type" to "Image" and under "Media source configuration" set the "Field with source information" to "media.image_library_widget_image". Only media types configured in this way can be used as libraries in the widget.
  • Give the appropriate permissions to site admins so they can create media entries within those media types.
  • Create some media entries.
  • Configure the image field to use "Image Library Widget" as widget.
  • In the widget settings form chose the media type to be used as image library.

Customization

Because the "image browser" is a view, you can do whatever Views customization you want. You can decide what display format to use (e.g. Grid, HTML List, Unformatted list, etc), or the size of image thumbnails. If there are to many images pre-ulploaded in that media type, you can configure a pager but in this case you'll need to enable Ajax (see "Limitations").

Ask your assistant about Image Library Widget

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
3
Tracked since
Aug 2023
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 2
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
2.0.0-alpha4 Pre-release 10–11 Sep 8, 2025
2.0.0-alpha3 Pre-release 9–10 Jun 13, 2025
2.0.0-alpha2 Pre-release 9–10 Aug 15, 2023