WP Manifestindependent plugin directory
manifest / media / image-mockup-maker

Image Mockup Maker

πŸš€ WordPress plugin for generating customizable image placeholders locally. Features REST API, shortcodes, and professional architecture. No external dependencies.

by Michael Ignacio Β· github.com/michaelignacio/image-mockup-maker Β· website

β˜… 0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/michaelignacio/image-mockup-maker/archive/refs/heads/main.zip

A powerful WordPress plugin for generating image placeholders locally without relying on external services. Perfect for development workflows, design mockups, and rapid prototyping.

🌟 Features

  • πŸš€ Local Generation - No external dependencies or API calls
  • 🎨 Customizable - Control size, colors, text, and format
  • πŸ“± Multiple Interfaces - WordPress shortcodes, REST API, and admin interface
  • πŸ–ΌοΈ Multiple Formats - Support for PNG, JPEG, and GIF

πŸ“¦ Installation

Via WordPress Admin

  1. Download the plugin ZIP file
  2. Go to Plugins β†’ Add New in your WordPress admin
  3. Click Upload Plugin and select the ZIP file
  4. Click Install Now and then Activate

Via FTP/Manual Installation

  1. Extract the plugin files to /wp-content/plugins/image-mockup-maker/
  2. Go to Plugins in your WordPress admin
  3. Activate Image Mockup Maker

Via WP-CLI

wp plugin install image-mockup-maker --activate

πŸ”§ Requirements

  • WordPress: 5.0 or higher
  • PHP: 7.4 or higher
  • GD Extension: Required for image generation
  • Memory: Recommend 128MB+ for large images

πŸš€ Quick Start

Using Shortcodes

// Basic placeholder
[imgmkp_placeholder size="400x300"]

// Custom colors and text
[imgmkp_placeholder width="500" height="200" bg="ff0000" color="ffffff" text="Custom Text"]

// Different format
[imgmkp_placeholder size="300x200" format="jpg" alt="My placeholder"]

Using REST API

# Basic placeholder
GET /wp-json/imgmkp/v1/generate/400x300

# With custom parameters
GET /wp-json/imgmkp/v1/generate/500x200?bg=ff0000&color=ffffff&text=Hello%20World

πŸ“– Documentation

Shortcode Parameters

Parameter Type Default Description
size string - Dimensions as "WIDTHxHEIGHT" (e.g., "400x300")
width integer 300 Image width in pixels
height integer 200 Image height in pixels
bg string cccccc Background color (hex without #)
color string 333333 Text color (hex without #)
text string "{width} x {height}" Custom text to display
format string png Image format (png, jpg, jpeg, gif)
alt string "Placeholder image" Alt text for accessibility
class string - CSS class for the img element

REST API Endpoints

Generate Placeholder Image

Endpoint: GET /wp-json/imgmkp/v1/generate/{dimensions}

Parameters:

  • dimensions (required): Format "WIDTHxHEIGHT" (e.g., "400x300")
  • bg (optional): Background color hex (without #)
  • color (optional): Text color hex (without #)
  • text (optional): Custom text to display
  • format (optional): Image format (png, jpg, jpeg, gif)

Example Requests:

# Basic 400x300 PNG
curl "https://yoursite.com/wp-json/imgmkp/v1/generate/400x300"

# Red background with white text
curl "https://yoursite.com/wp-json/imgmkp/v1/generate/500x200?bg=ff0000&color=ffffff"

# Custom text and JPEG format
curl "https://yoursite.com/wp-json/imgmkp/v1/generate/300x200?text=Hello%20World&format=jpg"

Admin Settings

Navigate to Settings β†’ Image Mockup Maker to configure:

  • Default Dimensions - Fallback width and height
  • Default Colors - Background and text colors
  • Size Limits - Maximum allowed dimensions
  • Display Options - Show/hide dimension text

πŸ› Troubleshooting

Common Issues

Images not generating:

  • Check that GD extension is installed: php -m | grep -i gd
  • Verify memory limits for large images
  • Check file permissions on /assets/fonts/

Text not rendering:

  • Font files may be missing or corrupted
  • Plugin falls back to built-in PHP fonts automatically

Size limits:

  • Default maximum is 8000x8000 pixels
  • Adjust in Settings β†’ Image Mockup Maker

πŸ“„ License

This project is licensed under the GPL v2 or later - see the LICENSE file for details.