KDA Thumbnails creates resized, cached image thumbnails from the WordPress Media Library (or any local file) without touching your original uploads. Thumbnails are generated once, stored in a configurable cache folder, and served directly on subsequent requests. How it works The plugin works in two
PricingFree downloadThe WordPress.org download is free. Pro versions, add-ons or external services may cost extra.
CompatibilityRequires WordPress 5.8 and PHP 7.4.
SourceWordPress plugins · Oct 25, 2026
01 / Source details
Aboutthistool.
KDA Thumbnails creates resized, cached image thumbnails from the WordPress Media Library (or any local file) without touching your original uploads. Thumbnails are generated once, stored in a configurable cache folder, and served directly on subsequent requests.
How it works
The plugin works in two modes: zero-code (everything from the settings page) and developer mode (shortcodes, PHP functions, filters).
Zero-code mode (no programming required):
01Go to Settings — KDA Thumbnails .
02Set the cache folder path (defaults to /wp-content/uploads/kda-thumbnails/ ).
03Choose the image library (Auto, Imagick, or GD).
04Configure the default output format (JPEG, PNG, or WebP) and quality (1-100).
05Optionally enable a watermark: choose between text and image, set color, opacity, position, font size, and font family (Google Fonts or a custom local .ttf/.otf file).
06Optionally enable responsive srcset: specify a list of widths (e.g. 300, 768, 1200) and an optional sizes attribute.
07Optionally enable automatic content image caching: add CSS classes to the list, and the plugin will replace matching <img> tags in post content with optimized thumbnails.
08Optionally enable remote image caching: allow http(s) URLs as sources, with SSRF protection, TTL refresh, and max file size limit.
That is it. The plugin takes care of the rest: generating thumbnails on first request, caching them, invalidating when the source changes, and enforcing a cache size quota if configured.
Developer mode (shortcodes and PHP):
Use the [kdath_thumbnail] shortcode in posts, pages, or widgets.
Call PHP functions in theme templates or custom plugins.
Hook into the_content to process all content images automatically.
Use the custom field ( kdath_thumbs_url ) to store and retrieve thumbnail URLs.
On-the-fly thumbnail generation with GD or Imagick (auto-detected, or force a specific engine on the settings page).
Output as JPG, PNG or WebP . Global default format setting applies to all thumbnails, including srcset variants.
Smart caching with optional organization by post type (each post type gets its own subfolder). The cache folder can be any absolute server path or a subfolder inside wp-content/uploads/ .
Optional watermark — text or image: Text watermark: custom text, color, opacity, position, and font size (in pixels or as a percentage of the smaller image side so it scales with the thumbnail).
Google Fonts: pick a font family from a curated list. The TrueType file is downloaded once and cached locally, then reused for every render. A custom local .ttf / .otf path can be used instead.
Outline (stroke) mode: render the text with a colored outline (configurable width in pixels) for readability on any background.
Image watermark: overlay a selected Media Library image with configurable opacity.
Shortcode [kdath_thumbnail] and PHP helper functions for theme and plugin developers. kdath_get_thumbnail_srcset( $args, $widths ) + kdath_the_thumbnail_srcset() for responsive srcset. Automatic caching of content images by CSS class (configurable list, applied via the the_content filter). Optional responsive srcset/sizes generation: configure a list of widths, and the rendered <img> tag can include srcset with wp -style width descriptors and an optional sizes attribute. Works for plugin shortcodes/PHP functions, content images, and native WordPress featured images. Optional remote image caching (opt-in, SSRF-protected, with TTL refresh and a max file size limit). Automatic cache size limit : the oldest thumbnails are purged automatically when the quota is exceeded. Lightweight admin page: engine status, cache size, font diagnostics and one-click cache clearing. Global output format setting (JPEG / PNG / WebP) applied to all generated thumbnails, including srcset variants.
Watermark font resolution
When a watermark is rendered the font is resolved in this order:
09The selected Google Font (downloaded once to wp-content/uploads/kda-thumbnails-fonts/<family>.ttf and reused).
10A custom local font file path you provide in the settings.
11If neither is available, the text falls back to the engine’s built-in/best-effort font.
The selected Google Font is downloaded on first use and cached, so the watermark always has a real font to render with (important for Imagick, which otherwise renders nothing when no font is configured). The “Status” panel on the settings page shows the resolved font and whether the Google Font has already been downloaded.
src — alternative to id : local file path or URL inside wp-content/uploads/ . Remote URLs are only supported when remote caching is enabled; otherwise use a Media Library ID or local path.
width — target width in pixels (integer).
height — target height in pixels (integer).
quality — JPEG/WebP quality, 1-100 (default: 90 from settings).
crop — crop mode: top , bottom , left , right , center (default: center ).
format — output format: jpg , png , webp (default: global “Output format” setting).
alt — image alt text (string).
class — extra CSS class(es) for the <img> tag (string).
Shortcode return value: an <img> HTML tag with src , width , height , alt , class , and optional srcset / sizes . On error returns empty string for non-admins, or an HTML comment with the error message for admins.
PHP functions
All functions are available after the plugin is activated.
kdath_get_thumbnail( $args )
Returns the cached thumbnail URL ( string ) or WP_Error on failure.
Returns a complete <img> tag. $attributes is an array of extra HTML attributes ( class , loading , decoding , fetchpriority , style , etc.). When “Responsive srcset” is enabled in settings, srcset and sizes are added automatically unless explicitly passed in $attributes .
Returns the thumbnail URL saved in the custom field configured in settings. Requires a Media Library attachment ID. If $meta_key is omitted, the globally configured field name is used.
Programmatically clear the entire cache. Useful after bulk imports or when you need to regenerate all thumbnails immediately.
Example:
KDATH_Thumbnail_Cache::clear_all();
Automatic content processing (no code required):
When the plugin is active, it automatically hooks into the_content and post_thumbnail_html . Images in post content that have one of the configured CSS classes (Settings — “Classes for automatic caching”) are replaced with cached thumbnails. Featured images rendered by WordPress (including block themes like Twenty Twenty-Five) are also processed and can include srcset/sizes automatically.
This replaces standard <img> tags in post content with optimized thumbnails. Useful when you cannot edit theme templates directly.
Custom field for thumbnail URL
When “Custom field for thumbnail URL” ( kdath_thumbs_url ) is configured in Settings — KDA Thumbnails, the plugin automatically saves the generated thumbnail URL into that post meta key for every Media Library attachment. This is useful if you want to access the URL via get_post_meta() without calling the plugin functions again.
All settings are available under Settings — KDA Thumbnails . No code is required.
General tab:
Cache folder path — absolute server path, or relative to wp-content/uploads/ (default: /wp-content/uploads/kda-thumbnails/ ). Paths starting with public/ are resolved relative to the web root.
Cache folder URL — public URL for the cache folder. Required when the path is outside the web root.
Custom field for thumbnail URL — optional meta key name. When set, the plugin saves each generated thumbnail URL into this field for Media Library attachments.
Organize cache by post type — saves thumbnails in subfolders per post type.
Classes for automatic caching — comma-separated CSS classes. Images with these classes in post content are automatically replaced with cached thumbnails.
Image library — choose GD, Imagick, or Auto.
Output format — default format for generated thumbnails: JPEG, PNG, or WebP. Applies to all thumbnails, including srcset variants.
02 / Source details
Gettingstarted.
01Upload the kda-thumbnails folder to /wp-content/plugins/ .
02Activate the plugin through the “Plugins” screen in WordPress.
03Go to Settings — KDA Thumbnails to configure the cache folder, engine and watermark.
03 / Source details
Frequently asked questions.
Which image library is used?
The plugin auto-detects Imagick first, then falls back to GD. You can force a specific engine on the settings page. Both must be enabled in PHP.
Are remote image URLs supported?
They are disabled by default. Enable “Allow remote image sources” on the settings page to cache external http(s) images. Remote fetching is protected against SSRF (only public IPs, default ports, no self-reference) and limited by a configurable max file size and TTL. Originals in the Media Library are still the recommended source.
Which Google Fonts are available, and where do they come from?
A curated list is offered in the settings (Roboto, Open Sans, Lato, Montserrat, PT Sans, PT Serif, Oswald, Raleway, Merriweather, Roboto Condensed, Noto Sans, Ubuntu, Playfair Display, Titillium Web). The TrueType file is fetched from the public google/fonts repository on GitHub, downloaded once, and cached locally under wp-content/uploads/kda-thumbnails-fonts/ . You can instead point the watermark at any local .ttf / .otf file.
What does the “Outline width” option do?
When set to a value greater than 0, the copyright text is drawn with a colored outline (stroke) around each letter. The outline width is in pixels. This keeps the text readable on both light and dark areas of a photo. Works with both GD and Imagick engines.
How does the cache size limit work?
Set “Cache size limit (MB)” to a value greater than 0. When the cache grows beyond the limit, the oldest cached thumbnails (by modification time) are removed automatically — both on a daily cron and after new thumbnails are generated. Set 0 for unlimited.
How do I clear the cache?
Use the “Clear all cache” button on the settings page, or clear individual post-type folders when “Organize cache by post type” is enabled. You can also call KDATH_Thumbnail_Cache::clear_all() programmatically.
Will this modify my original images?
Never. Originals in the Media Library are left untouched; only cached copies are created.
Do I need to edit theme templates to use this plugin?
No. If you enable “Classes for automatic caching” and add the relevant CSS classes to the list, the plugin automatically replaces matching <img> tags in post content and featured images. For full control, use the shortcode or PHP functions in your templates.
Can I use different formats for different thumbnails?
Yes. The global “Output format” setting applies to all thumbnails by default, but you can override it per-request with the format parameter in the shortcode or PHP functions.
Is WebP supported?
Yes. WebP is supported for both output (when selected as the format) and as a source image (GD with imagecreatefromwebp , Imagick natively). The plugin checks for WebP support at runtime and falls back gracefully if the engine does not support it.
Website LLMs.txt and LLMs-Full.txt Generator is an LLMs.txt generator and llms-full.txt generator for WordPress. It helps site owners generate, manage, preview, validate, and serve AI discovery files from published public content. Use it to create structured /llms.txt and optional /llms-full.txt end
EngageDock AI is a customizable floating contact widget for WordPress websites that want more leads and faster visitor communication. It helps small businesses turn website traffic into calls, texts, emails, and callback requests from one clean contact panel. Key Features: Click-to-Call – One tap ca
Altify AI is an auto ALT text and AI ALT text plugin for WordPress images. It helps generate descriptive image ALT text for accessibility and image SEO. Use bulk image ALT text tools for your Media Library, generate featured image ALT text automatically, and scale WooCommerce image ALT updates with
The Accepted Payment Methods plugin is a straightforward, lightweight solution that enhances your website by displaying visually appealing icons of the payment methods you accept. This plugin is ideal for a variety of websites, including e-commerce platforms, service-oriented websites, and informati