Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module replaces base64-encoded icons used by the Paragraphs module with references to Media entities. This significantly reduces configuration file sizes, making them easier to manage and improving performance. Icons will continue to display as usual, but the underlying configuration will be much smaller.

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
5 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
1.0.0 Stable Feb 6, 2026