Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

paragraphs_media_icons

5 sites No security coverage
View on drupal.org

Eliminates config bloat by replacing Paragraphs' base64-encoded icons with Media entity references. Reduces config size by 90%+.

The Problem
The Paragraphs module stores paragraph type icons as base64-encoded images inside configuration YAML.
On sites with 60–80 paragraph types, this can inflate config exports to 50–60 MB, slow drush cex to minutes, and generate unreadable git diffs.

The Solution
This module replaces config-stored icons with Media entity references using Drupal’s third-party settings API.
A 15–50 KB base64 blob becomes a simple integer Media ID—reducing each paragraph type’s config by ~99%.

Key Features
90–95% config reduction (e.g., 60 MB → 2–3 MB)
One-command migration (drush pmi:migrate)
Full Paragraphs Previewer support (Modal, Dropdown, Buttons)
No UX changes—icons display exactly the same
Standards-compliant: uses third-party settings API
Faster config exports and clean git diffs

How It’s Different
Rather than modifying config entities (which breaks validation), this module:
Extends ParagraphsType to override getIconUrl()
Stores Media IDs via third-party settings
Ensures complete compatibility with Paragraphs Previewer and related modules

Technical Overview
Entity override for icon URLs
Media ID stored as config, not file data
Migration service converts existing icons
Hook integrations for seamless widget support

Installation
Requirements: Drupal 11.3+, PHP 8.1+, Paragraphs, Media

Enable: drush en paragraphs_media_icons -y
Clear cache: drush cr
Works immediately—no additional setup required.

Usage
Go to Structure → Paragraphs types
Edit a type and use the Media Icon field
Select an image from the Media Library

Save
Icons appear wherever Paragraphs icons normally display.

Drush Commands
pmi:stats — Shows config bloat and icon usage
pmi:migrate — Converts all base64 icons to Media entities (safe to run multiple times)

Migration Workflow
drush pmi:stats
drush pmi:migrate
drush pmi:stats # should show 0 MB bloat
drush cex
git commit -m "Migrated paragraph icons; reduced config size"

Security
Uses Drupal’s Entity API
Respects Media access permissions
No raw SQL
Follows Drupal coding standards

Activity

Total releases
1
First release
Feb 2026
Latest release
2 months ago
Release cadence
Stability
100% stable

Releases

Version Type Release date
1.0.0 Stable Feb 6, 2026