Skip to content

Latest commit

Β 

History

26 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Smart Image Canvas

Automatically generate beautiful CSS-based featured images when no featured image is set.

WordPress PHP License

πŸš€ Features

Core Functionality

  • Dynamic CSS-based Images: Generate featured images without creating actual image files
  • Live Preview: Real-time preview in WordPress Customizer and admin settings
  • Template System: 6 professional template styles with customizable colors and fonts
  • Responsive Design: Works seamlessly across all device sizes
  • Aspect Ratio Control: Support for various aspect ratios (16:9, 4:3, 1:1, etc.)

Performance & Security

  • Advanced Caching: HTML and CSS caching with automatic invalidation
  • Enhanced Security: Comprehensive input validation, nonce protection, and permission checks
  • Database Optimization: Optimized queries with transient caching
  • CSS Minification: Automatic CSS compression in production

πŸ“‹ Requirements

  • WordPress 5.0 or higher
  • PHP 7.4 or higher
  • Modern web browser with CSS Grid support

πŸ›  Installation

From GitHub (Development)

  1. Clone this repository:

    git clone https://github.com/truebite/smart-image-canvas.git
  2. Upload the smart-image-canvas folder to your /wp-content/plugins/ directory

  3. Activate the plugin through the 'Plugins' menu in WordPress

  4. Configure the plugin via Settings β†’ Smart Image Canvas

Manual Installation

  1. Download the latest release from the Releases page
  2. Upload the plugin files to /wp-content/plugins/smart-image-canvas/
  3. Activate the plugin through the WordPress admin

🎨 Usage

  1. Activate the Plugin: Go to Plugins β†’ Installed Plugins and activate "Smart Image Canvas"

  2. Configure Settings: Navigate to Settings β†’ Smart Image Canvas to customize:

    • Colors and gradients
    • Typography settings
    • Template styles
    • Post types to target
  3. Live Preview: Use the WordPress Customizer for real-time preview of your settings

  4. Automatic Generation: The plugin automatically generates featured images for posts without them

πŸ”§ Configuration

The plugin offers extensive customization options:

  • Background Colors: Solid colors or CSS gradients
  • Typography: Font family, size, weight, and alignment
  • Templates: Choose from 6 pre-designed styles
  • Category Colors: Automatic color assignment based on post categories
  • Custom CSS: Add your own styling for advanced customization

🎯 Supported Themes

The plugin includes specific compatibility enhancements for:

  • Premium Themes: Divi, Avada, Elementor, X/Pro, BeTheme, Bridge, Salient
  • Page Builders: Elementor, Divi Builder, Beaver Builder, Visual Composer
  • Popular Free Themes: Astra, GeneratePress, OceanWP, Neve, Kadence

πŸ— File Structure

smart-image-canvas/
β”œβ”€β”€ smart-image-canvas.php          # Main plugin file
β”œβ”€β”€ includes/                       # Core functionality
β”‚   β”œβ”€β”€ class-admin-settings.php    # Admin interface
β”‚   β”œβ”€β”€ class-image-generator.php   # Image generation logic
β”‚   β”œβ”€β”€ class-frontend-display.php  # Frontend output
β”‚   β”œβ”€β”€ class-customizer.php        # WordPress Customizer integration
β”‚   β”œβ”€β”€ class-cache-manager.php     # Caching system
β”‚   β”œβ”€β”€ class-template-manager.php  # Template handling
β”‚   β”œβ”€β”€ class-theme-compatibility.php # Theme compatibility
β”‚   └── class-hook-manager.php      # WordPress hooks management
β”œβ”€β”€ assets/                         # CSS and JavaScript files
β”‚   β”œβ”€β”€ css/                        # Stylesheets
β”‚   └── js/                         # JavaScript files
β”œβ”€β”€ templates/                      # Template files
└── uninstall.php                   # Clean uninstall

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

Development Setup

  1. Clone the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

Coding Standards

  • Follow WordPress coding standards
  • Use proper PHPDoc comments
  • Include security checks (nonces, capability checks, input validation)
  • Test with latest WordPress version

πŸ“ Changelog

Version 1.0.0

  • Initial release
  • Dynamic CSS-based image generation
  • WordPress Customizer integration
  • Advanced caching system
  • Theme compatibility layer
  • Security enhancements

πŸ› Bug Reports

If you find a bug, please create an issue on GitHub with:

  • WordPress version
  • PHP version
  • Theme being used
  • Steps to reproduce
  • Expected vs actual behavior

πŸ“„ License

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

πŸ™ Acknowledgments

  • WordPress community for guidelines and best practices
  • All theme developers for compatibility testing
  • Contributors and testers

πŸ“ž Support


Made with ❀️ for the WordPress community

  • βœ… WordPress Default Themes: Twenty Twenty-Three, Twenty Twenty-Two, etc.

Installation

  1. Upload the plugin folder to /wp-content/plugins/
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Go to Settings β†’ Auto Featured Image to configure
  4. Use Appearance β†’ Customize for live preview

Configuration

Basic Settings

  • Enable Plugin: Turn the feature on/off
  • Post Types: Select which post types should have auto-generated images
  • Aspect Ratio: Choose from 10 different aspect ratios
  • Template Style: Select from 6 pre-designed templates

Styling Options

  • Background Colors: Set primary and secondary colors
  • Gradients: Enable gradient backgrounds
  • Typography: Choose from 11 font families
  • Text Effects: Add shadows and overlays

Advanced Features

  • Category Colors: Assign specific colors to post categories
  • Custom CSS: Add your own styling
  • Theme Compatibility: Automatic theme-specific optimizations

Troubleshooting

If the plugin doesn't work with your theme:

  1. Go to Settings β†’ Auto Featured Image β†’ Debug & Troubleshooting
  2. Check your Theme Compatibility Status
  3. Run the Test Generation tool
  4. Review the Debug Report for specific issues
  5. Use the compatibility fixes or contact support

Technical Details

WordPress Hooks Used

  • post_thumbnail_html
  • get_post_metadata
  • has_post_thumbnail
  • wp_get_attachment_image
  • the_post_thumbnail
  • Additional theme-specific hooks

File Structure

smart-image-canvas/
β”œβ”€β”€ smart-image-canvas.php          # Main plugin file
β”œβ”€β”€ includes/
β”‚   β”œβ”€β”€ class-image-generator.php       # Core image generation
β”‚   β”œβ”€β”€ class-admin-settings.php        # Admin interface
β”‚   β”œβ”€β”€ class-frontend-display.php      # Frontend display
β”‚   β”œβ”€β”€ class-customizer.php           # WordPress Customizer
β”‚   β”œβ”€β”€ class-theme-compatibility.php   # Theme compatibility
β”‚   └── class-debug.php                # Debug utilities
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ css/                           # Stylesheets
β”‚   β”œβ”€β”€ js/                            # JavaScript files
β”‚   └── templates/                     # Template styles
└── uninstall.php                      # Cleanup on uninstall

Requirements

  • WordPress 5.0 or higher
  • PHP 7.4 or higher
  • Active WordPress theme with post thumbnail support

License

GPL v2 or later

Support

For support, feature requests, or bug reports, please use the WordPress plugin directory support forums or create a debug report using the built-in tools.

Changelog

Version 1.0.0

  • Initial release
  • Core featured image generation
  • Live preview functionality
  • Theme compatibility system
  • Debug and troubleshooting tools
  • Support for 10 aspect ratios
  • 6 template styles
  • Category-based color assignment

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages