Module Description
Media Thumbnails Introduction
Provides a plugin type for custom media entity thumbnails.

This module allows developers to create custom media entity thumbnails using plugins.

That way you can add the media entity 'thumbnail' field to Views or Media entity display modes, optionally add an image style and get preview images e.g. for file types not supported by core thumbnails.

Sample use cases:


* provide thumbnails for file types unsupported by core, like PDF, SVG, ePub, Word or Excel
* create variants of thumbnails, e.g. watermarked thumbnails for media entities
* provide custom generic thumbnails, e.g. configurable in the UI
* store thumbnails in a custom location, e.g. use public thumbnails for private media entities

Installation
Install this module as usual, and enable at least one thumbnail plugin module. See below for a list of currently existing plugins.

Removal
Uninstall all thumbnail plugin modules. Optionally run the refresh batch operation (see below) to restore the default media thumbnails. At last, uninstall this module.

Configuration
The configuration page (/admin/config/media/thumbnails) allows specifying a maximum thumbnail width and an optional background color for plugins supporting it. There's also a form for running a batch operation for thumbnail regeneration. Custom plugins might provide their own configuration pages.

API
Plugins can be configured (with annotations) per media file mime type.

Example:

* @MediaThumbnail( * id = "media_thumbnail_pdf", * label = @Translation("Media Thumbnail PDF"), * mime = { * "application/pdf" * } * ) The plugin should implement a method createThumbnail($sourceUri). The uri of the local file (media source) is passed to this method. The plugin should return a (new or existent) managed thumbnail file object.

All media entity related stuff will be handled by the plugin manager.

Example
The Media Thumbnails PDF module contains a ready to use plugin. It provides thumbnails for media entities of mime type application/pdf.

Modules providing thumbnail plugins
Media Thumbnails EPUB Media Thumbnails PDF Media Thumbnails SVG Media Thumbnails Video, thanks to Szczepan Musial

Project Usage
1570
Creation Date
Changed Date
Security Covered
Not Covered By Security Advisory
Version Available
Production
Module Summary
This module aims to solve the problem of creating custom media entity thumbnails using plugins, allowing for thumbnails to be added to Views or Media entity display modes and supporting file types not supported by core thumbnails.
Data Name
media_thumbnails

OPENAI CHATBOT

OPENAI CHATBOT

19:55:17
Generic Chatbot
Hi, I'm a Drupal module expert powered by OpenAI, answering your questions about the Drupal module ecosystem. How can I be helpful today? Please note that we will log your question.