Description
WP-Force Images Download is the most complete, lightweight, and developer-friendly image download plugin for WordPress. Designed for photographers, wallpaper sites, digital asset stores, creative agencies, and content creators β it transforms any image into a secure, one-click force download with a pixel-perfect branded button.
Whether you need a simple [wpfid] shortcode or full programmatic control with PHP template tags, this plugin covers every use case with zero performance overhead.
π Why WP-Force Images Download?
Most download plugins are bloated. This one is different:
- Featherweight β Loads only one CSS file + one JS file on the frontend. No jQuery dependency for core functionality.
- SaaS-grade Admin UI β Tabbed settings page with Live Button Preview so you see exactly what visitors will see before saving.
- Future-proof β Uses
wp_check_filetype()instead of hardcoded whitelists, so WebP, AVIF, HEIC and any new format WordPress adds is automatically supported. - Accessible β Buttons are semantic
<button>elements with ARIA labels, full keyboard support, and WCAG 2.1 AA contrast compliance across all 4 styles. - Conflict-safe β All hooks, query args, nonce actions, and option keys use the
wpfid_namespace to eliminate conflicts with any other plugin.
β¨ Core Features
π¨ 4 Premium Button Styles
Choose from four professionally engineered CSS button styles β all powered by CSS custom properties (--wpfid-color, --wpfid-text) for effortless theming:
- Solid β Bold, filled CTA button with subtle elevation shadow.
- Outline β Transparent background with a crisp colored border. Text color adapts on hover.
- Soft / Ghost β Tinted semi-transparent background (powered by
color-mix()). Elegant and modern. - Text Only β Minimal styled link, zero background or borders. Perfect for inline usage.
πΌοΈ Universal Color System
Set a global button color and text color once in the settings. Override them per-post using shortcode attributes. Supports HEX (#2271b1), RGB (rgb(255,0,0)), RGBA, and natural language color names (MidnightBlue, Tomato, DodgerBlue).
ποΈ AJAX Live Preview
The settings page features a real-time sticky preview widget powered by WordPress’s native wpColorPicker. Every change you make β style, color, icon, file size toggle β reflects instantly in the preview. No save reload check cycle.
β‘ AJAX Downloads (Zero Reload)
When AJAX Downloads are enabled, visitors click the button and the file downloads immediately in-page using the Fetch API + Blob URL approach. No new tab opens. No page reloads. No redirect confusion.
π Download Stats Dashboard
Every download is tracked using WordPress post meta. View a sortable, paginated analytics table from WPFID > Stats Dashboard in your admin. See which images are most popular, filter by date, and export data.
π€ Auto-Attach Button
Zero coding required. Enable Auto-Attach and the download button is automatically injected before or after post content on any public post type that has a featured image. Toggle per post type (Post, Page, custom CPTs).
π Email Gate
Require visitors to enter their email address before the download begins. The email is captured via AJAX (no page reload), securely saved to the database, and then the download starts automatically. Collected emails are viewable in the database or Stats page.
π Login Gate / Require Login
Restrict downloads to logged-in users only. Unauthenticated visitors are redirected to the WordPress login page and returned to the download after successful authentication.
π Image Size Picker
When enabled, a dropdown appears on the download button allowing visitors to choose between registered WordPress image sizes (Thumbnail, Medium, Large, Full, or any custom size registered by your theme).
π’ Download Counter
Optionally display the total download count directly below the button. Powered by post meta for instant reads and lightweight writes.
π Bulk Rename / Filename Templates
Control exactly what filename visitors receive when they download, using a powerful variable templating system:
%site_name%, %post_title%, %post_id%, %filename%, %timestamp%, %rand%, %md5%
Example: [wpfid new_name="%post_title%_%rand%"] produces My-Post-Title_48291.jpg
π Modern Format Support
Powered by native wp_check_filetype(). The plugin automatically supports every image MIME type WordPress recognizes β including WebP, AVIF, HEIC, SVG, PNG, JPEG, GIF, BMP, ICO, and any future format added to WordPress Core. No configuration required.
π‘οΈ Enterprise-Grade Security
– All form submissions verified with WordPress nonces
– Rate limiting: 30 requests per minute per IP prevents download abuse
– Full input sanitization and output escaping on every field
– Session-aware download handler via admin-post.php + admin-ajax.php
– defined('ABSPATH') || die() guard on every file
π οΈ Usage
Basic Shortcode
Place in any Post, Page, or Widget:
[wpfid]
With Custom Label
[wpfid title=”Download HD Wallpaper”]
With Specific Image URL
[wpfid link=”https://example.com/my-image.jpg”]
With Color Overrides
[wpfid color=”#e83e8c” textcolor=”#ffffff”]
Combined Example
[wpfid title=”Get the Image” color=”MidnightBlue” textcolor=”white” new_name=”%post_title%”]
PHP Template Tag (for theme developers)
Or use the direct function call:
π Shortcode Attributes Reference
Attribute
Default
Description
title
Download
Button label text
link
(featured image)
Direct URL to the image to download
color
Settings value
Button background color (HEX, RGB, or color name)
textcolor
Settings value
Button text/icon color
new_name
Settings value
Filename template for the downloaded file
class
(empty)
Additional CSS class(es) on the button wrapper
style
Settings value
Button style override: 1=Solid, 2=Outline, 3=Soft, 4=Text
π Details
Semantic HTML5 Output
Every download button is a native <button> or <a> element with descriptive title attributes and aria-label support. No div-soup, no generic onClick handlers β pure semantic markup that search engine crawlers and AI language models can interpret correctly.
Schema & Structured Data Ready
The plugin output is compatible with DigitalDocument and ImageObject schema markup. You can wrap the shortcode output in your own schema markup to signal to Google that this is a downloadable asset.
Core Web Vitals Safe
– CSS is loaded with wp_enqueue_style() with versioned cache-busting
– JavaScript is deferred (loaded in footer) and only runs on pages with the shortcode
– Zero render-blocking resources introduced
– No external font or icon CDN calls β uses WordPress Dashicons (already loaded)
Translation Ready (GEO / i18n)
Every user-facing string is wrapped in __(), esc_html__(), or esc_html_e() translation functions with the wp-force-images-download text domain. Compatible with WPML, Polylang, Loco Translate, and TranslatePress for multilingual and geographic market targeting.
AI / LLM Crawler Compatibility
The plugin generates standard HTML anchor elements with meaningful title and download attributes, making button intent clear to AI-powered crawlers (GPTBot, Google Bard, Applebot) without requiring additional structured data.
Screenshots
Blocks
This plugin provides 1 block.
- Image Download Button
Installation
Method 1: WordPress Plugin Repository (Recommended)
1. Go to Plugins > Add New in your WordPress Dashboard.
2. Search for WP Force Images Download.
3. Click Install Now, then Activate.
Method 2: Manual Upload
1. Download the plugin .zip file.
2. Go to Plugins > Add New > Upload Plugin.
3. Choose the zip file and click Install Now.
4. Click Activate Plugin.
Method 3: FTP/SFTP
1. Unzip and upload the wp-force-images-download folder to /wp-content/plugins/.
2. Activate via Plugins in WordPress admin.
After Activation
– A branded notification banner appears welcoming you to v2.5.
– Navigate to WPFID > Settings in your admin sidebar.
– Use the π¨ Button Design tab to style your button with the Live Preview.
– Use the βοΈ Behaviour & Features tab to enable Email Gate, Login Gate, Auto-Attach, etc.
– Deploy [wpfid] anywhere in your content.
FAQ
-
Simply add the shortcode
[wpfid]to any post or page. The plugin will automatically detect the post’s featured image and force-download it. If you want a specific image, use[wpfid link="https://your-image-url.com/image.jpg"]. -
Where do I find the settings?
-
Navigate to WPFID > Settings in your WordPress admin sidebar. The settings page has three tabs: Button Design, Behaviour & Features, and Shortcode Help.
-
How do I track downloads?
-
Go to WPFID > Stats Dashboard. Every download is tracked automatically. You’ll see a table with post titles, download counts, last downloaded time, and direct links.
-
How does the Email Gate work?
-
When “Require Email” is enabled, visitors see an email input field next to the download button. After entering a valid email and clicking the button, the email is saved to the database and the download starts automatically β all without any page reload. Collected emails are stored in
wp_optionsunderwpfid_collected_emails. -
How does the Login Gate work?
-
When “Require Login” is enabled, clicking the download button redirects unauthenticated users to the WordPress login page. After a successful login, they are returned to the original page.
-
Does this plugin support WebP, AVIF, HEIC images?
-
Yes. The plugin uses WordPress’s native
wp_check_filetype()function instead of a hardcoded whitelist. This means it automatically supports every image format WordPress recognizes β including WebP, AVIF, HEIC, PNG, JPEG, GIF, SVG, BMP, ICO, and any format added in future WordPress updates. -
Yes, in two ways: (1) Set universal colors in WPFID > Settings > Button Design β this applies to all buttons site-wide. (2) Override per-post using shortcode attributes:
[wpfid color="#ff0000" textcolor="#ffffff"]. Color values can be HEX, RGB, RGBA, or English color names likeTomato,MidnightBlue,DodgerBlue. -
Can I rename the downloaded file?
-
Yes. Use the
new_nameattribute in the shortcode:[wpfid new_name="%post_title%_%rand%"]. Or set a global rename pattern in WPFID > Settings > Behaviour & Features > Rename Pattern. Available variables:%site_name%,%post_title%,%post_id%,%filename%,%timestamp%,%rand%,%md5%. -
Does AJAX download mode work for all file types?
-
Yes. AJAX download mode uses the Fetch API to retrieve the file as a binary blob and triggers the download via a programmatic anchor click. It works for all image formats and falls back gracefully in older browsers.
-
Will the plugin slow down my site or hurt SEO?
-
No. The plugin is carefully optimized: CSS and JS only load on pages where the shortcode is used, all assets are versioned for cache efficiency, no render-blocking scripts, no external CDN calls, and the button output is pure semantic HTML5.
-
Is the plugin compatible with Gutenberg?
-
Yes. Use the Shortcode block in Gutenberg and paste
[wpfid]. The block editor renders a preview placeholder. The actual button renders correctly on the frontend. -
Does it work with WooCommerce or custom post types?
-
Yes. The shortcode works in any content area. Auto-Attach can be enabled for any registered public post type, including WooCommerce products.
-
Use
<?php echo do_shortcode('[wpfid]'); ?>anywhere in your template files. Or use the direct template tag:<?php wp_fid( 'Download', '#2271b1' ); ?>. -
Is the plugin GDPR compliant regarding email collection?
-
The Require Email feature collects email addresses entered voluntarily by users. You are responsible for disclosing this in your privacy policy. The emails are stored in your own WordPress database (never sent to a third party). We recommend adding a consent checkbox or linking to your privacy policy near the email field using Custom CSS or hooks.
Reviews
Contributors & Developers
“WP-Force Images Download” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “WP-Force Images Download” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
2.5 β Major Platform Update
- NEW: Completely redesigned admin settings into a 3-tab interface (Button Design / Behaviour & Features / Shortcode Help) for dramatically improved UX.
- NEW: Email Gate β Visitors must enter an email address before downloading. Email is captured via AJAX, stored in the database, and the file downloads immediately β no page reload.
- NEW: Login Gate β Restrict downloads to logged-in users. Unauthenticated visitors are redirected to the login page and returned after authentication.
- NEW: Version-aware admin activation notice β A modern branded notice appears for new installs and upgrades, linking directly to the correct WPFID settings menu.
- NEW: Graceful fallback β If no image exists for a post and no
link=attribute is provided, a styled info notice is displayed instead of a broken download or HTML file. - NEW: Section cards in the Behaviour & Features tab with icon headings and v2.5 version badges for quick scanning.
- NEW: Shortcode Help tab with a full reference table β always accessible without scrolling.
- IMPROVED: Live Button Preview widget is now sticky in the sidebar and works across both settings tabs.
- IMPROVED: Dismiss handler for admin notices is now conflict-safe β bails immediately on every other admin page with zero performance overhead.
- IMPROVED: All nonces scoped with descriptive action names β zero conflict with any other plugin or theme using generic nonce names.
- FIX: Settings were not propagating correctly for logged-out users. Root cause was WordPress/browser JS caching due to version number staying at
2.0. Version bumped to2.5to bust all caches. - FIX:
settings_fields()/do_settings_sections()pattern replaced with direct callback invocations inside tabs, eliminating rendering artifacts from the legacy WordPress Settings API output. - SECURITY: All
$_GETand$_POSTsuperglobals in new handlers properly passed throughsanitize_text_field( wp_unslash() )before use.
2.0 β Feature Expansion
- NEW: Download Counter β Track every download with post meta. Displays inline below the button.
- NEW: Stats Dashboard β Dedicated admin sub-page showing most downloaded images sorted by count.
- NEW: AJAX Downloads β Seamless in-page downloads using Fetch API + Blob URL. No new tab, no page redirect.
- NEW: Image Size Picker β Dropdown lets visitors choose registered WordPress image sizes (Thumbnail, Medium, Large, Full).
- NEW: Auto-Attach Button β Inject download button before or after post content automatically based on post type.
- NEW: Rate Limiting β Built-in protection (30 downloads/minute/IP) using WordPress transients.
- NEW: Universal Color System β Set site-wide button color and text color from the admin dashboard using WP Color Picker.
- NEW: Real-Time Live Preview β Preview button appearance in the admin sidebar as you change settings.
- NEW: 4 Button Styles β Solid, Outline, Soft/Ghost, Text-only. All CSS variable driven with hover animations.
- NEW:
textcolorshortcode attribute β Override text/icon color per button. - IMPROVED: Replaced hardcoded MIME type whitelist with
wp_check_filetype()for automatic WebP, AVIF, HEIC support. - IMPROVED: Replaced deprecated
current_time('timestamp')withtime(). - IMPROVED: Replaced custom byte formatter with native WordPress
size_format(). - REMOVED: Legacy
fd.phpdirect download handler (replaced by secureadmin-post.phphandler). - SECURITY: Added nonce verification to all form handlers.
- SECURITY: Added dedicated top-level WPFID admin menu to replace the settings under Settings > General.
1.9
- SECURITY: Fixed CVE-2025-11809 β Added full sanitization and escaping for all shortcode attributes.
- Codebase reviewed and passed WordPress Plugin Check (plugin-check) standards.
1.8
- Added detailed inline documentation for all functions.
- Improved plugin architecture and loading performance.
1.7
- NEW: Custom CSS class support in shortcode (
classattribute). - NEW: Template tag support for renaming downloaded files.
- FIX: Zero-byte downloaded files bug resolved.
- FIX: Template tag not downloading picture bug resolved.
- Added detailed inline documentation.
1.6
- Fixed remote file inclusion (RFI) vulnerability.
- Security hardened throughout.
- Custom CSS textarea added in admin to style the download button.
1.5
- Bulk rename feature introduced.
- Basic button theming and style options added.
- Improved security and performance.
1.4
- Shortcode
new_nameattribute for per-post file renaming. - Global rename pattern option in admin settings.
- Admin settings page introduced.
1.3
- Expanded MIME type support (additional image types).
- Security hardened.
1.2
- Added
linkattribute to[wpfid]shortcode for custom image URLs.
1.1
- Shortcode support introduced.
- Basic button styling and color options.
1.0.0
- Initial public release.

