定制 cms-alchemy/quick-media 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

cms-alchemy/quick-media

最新稳定版本:v1.1.1

Composer 安装命令:

composer require cms-alchemy/quick-media

包简介

Token-based media embedding for Drupal ([media:ID] → <img>).

README 文档

README

Quick Media is a lightweight Drupal module that allows editors to embed media entities directly into content using simple tokens.

Instead of navigating the media browser or manually inserting embeds, editors can use:

[media:123]

…and have it automatically rendered as an <img> tag.

Installation

composer require cms-alchemy/quick-media
drush en quick_media

Features

  • Token-based media embedding: [media:ID]
  • Automatically resolves the correct source field for any media type
  • Outputs fully formed <img> tags with:
    • src
    • alt
    • optional title
  • Safe HTML escaping
  • Cache tag integration for proper invalidation
  • Views-based UI for browsing media and copying tokens
  • Click-to-copy tokens in admin UI

How It Works

The module provides a text filter:

quick_media_token_filter

This filter scans content for:

[media:123]

It then:

  1. Loads the media entity
  2. Resolves the source field dynamically (no hardcoding image fields)
  3. Loads the referenced file
  4. Generates a public URL
  5. Outputs an <img> tag

Example output:

<img src="/sites/default/files/example.jpg" alt="Example" style="max-width:100%;">

## Requirements
Drupal 9, 10, or 11
Media module
File module
Image module (for thumbnails in UI)

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2026-03-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固