🔥 Black Friday Sale: Get 65% OFF Any PageForge Pro Plan! Use code BF65 Claim Offer →
Account Get it free
Code and core – Smart Image Ratio icon
Actively maintained Tested with WP 7.1 #2 in aspect ratio

Code and core – Smart Image Ratio

Take full control of your featured images with smart cropping, custom ratios, and blur-fill automation.

Active installs50+10+ tier
Downloads · 30d234▲ +4.5% vs prev. 30d
Rating—0 reviews
Health score64/100Good
All-time downloads1.1KSince Aug 2026
Support resolved—No recent threads
RequiresWP 5.0PHP any
Downloads · 7d73▲ +37.7% week over week
Our verdict

Solid choice

Code and core is a solid plugin choice in 2026, with a few things worth checking first. It runs on 50+ sites and was last updated 2 months ago, and scores 64/100 on our health check.

  • Tested with the latest WordPress (7.1)
  • Small user base (50+ active installs)
  • Very few reviews so far

How does it stack up?

Side-by-side on installs, updates, ratings & support

Daily downloads

91827Sep 4Oct 18Dec 2
Yesterday15
Daily average (1y)10
Peak day168Sep 2, 2026
Last 12 months1.1K

Download spikes usually follow a new release — each site that auto-updates counts as a download.

Rankings

Where Code and core stands today

WordPress.org search rankings

Live position in the plugin search, top 100
KeywordPositionCompeting pluginsCategory
aspect ratio #49 724 Best aspect ratio plugins →
cropping #44 317 Best cropping plugins →
featured image >100 5,243 Best featured image plugins →
image regeneration #28 353 Best image regeneration plugins →
smart fill #24 861 Best smart fill plugins →

Version adoption

Share of active sites per release.

  • 1.0100.0%

About Code and core – Smart Image Ratio

From the official readme · v2.0.0

Description

Codeandcore Smart Image Ratio is a premium WordPress plugin designed for high-fidelity aspect ratio management. It empowers developers and site owners to create perfectly sized image variations with interactive cropping, modern smart-fill technology, and an efficient background processing engine.

The Ultimate Control Over Your Library

In our latest major release, we’ve transformed the plugin into a highly efficient, server-friendly powerhouse:

  • Automatic Data Cleanup: Keep your database and literal <upload> folders 100% bloat-free. When a post or media attachment is deleted, the plugin intelligently hunts down and permanently deletes all generated ratio variations and tracking metadata.
  • Conversion Coverage Dashboard: Need to know how many images are actually structured correctly? Our new real-time statistical dashboard displays your conversion progress percentages across all registered post types beautifully.
  • Atomic Metadata Infrastructure: Built-in race condition prevention. All metadata updates use optimistic locking to ensure data integrity during concurrent AJAX operations.
  • Harden Security & Privacy: All AJAX endpoints strictly enforce capability checks. Custom upload directories are automatically protected with index.php files to prevent directory listing.
  • 100% Privacy Compliance (Native Hosting): We’ve completely detached from third-party CDNs. Every single asset (from SweetAlert2 modules to SaaS-inspired Google Fonts) is hosted natively within the plugin folder. 0 tracking, 0 offloaded scripts.

Boost Your SEO & User Experience

Image optimization is a core pillar of technical SEO. By serving perfectly sized aspect ratios, you reduce Layout Shift (CLS), which is a critical Core Web Vital metric. Faster loading, correctly dimensioned images signal search engines that your site provides a high-quality user experience. Additionally, our “Smart-Fill” technology ensures that your featured images always look intentional and professional, reducing bounce rates and increasing user engagement.

Features

  • Custom Aspect Ratios: Define unlimited aspect ratios (e.g., 16:9, 4:3, 1:1) through a sleek, SaaS-inspired admin interface.
  • Interactive Cropping: Powered by Cropper.js, providing a pixel-perfect interface within the WordPress Media Library to adjust every variation manually.
  • Smart Fill & Blur Flow: Automatic color-sampled blurred backgrounds for non-standard image compositions—never see awkward white bars again.
  • Atomic Metadata Management: Robust optimistic locking system that prevents data corruption during simultaneous image generations.
  • Security Hardening: Strict capability enforcement (edit_posts) for all internal AJAX operations and automatic directory protection for generated assets.
  • Automatic Storage Cleanup: Intelligent logic that automatically purges image variations and metadata when a Post or Media item is deleted, keeping your server bloat-free.
  • Conversion Coverage Dashboard: Real-time card-based statistics showing conversion progress across all registered post types.
  • 100% Localized Assets: Zero remote CDN tracking. All dependencies (SweetAlert2, Google Fonts) are shipped locally for absolute privacy standard compliance.
  • Developer-First Architecture: Built with modern PHP practices, 100% strict compliance with WordPress Coding Standards (WPCS) & PluginCheck, yielding a clean and deeply documented Public API.
  • Gutenberg & Classic Editor Integration: Seamless UI panels (vCards) injected directly into the Block Editor and Classic Post screens to manage ratios dynamically while writing content.
  • Frontend Shortcodes & APIs: Simple [code_and_core_sir_image] shortcode and PHP helper functions for effortless frontend rendering and page-builder (Elementor, Divi) compatibility.
  • Advanced Debug Logging: Isolated system-level flat-file logging (cnc-sir-debug.log) for robust server execution monitoring and troubleshooting without cluttering standard WordPress debug logs.
  • Real-time Quality Playground: Adjust JPEG output quality in settings and see instant canvas-simulated results on your sample images before saving.
  • Maintenance & Wipe Tools: Single-click administrative actions to instantly clear background queues, completely wipe ratio configurations, and purge all plugin metadata—assuring a pristine environment when managing staging sites.

Developer & Integration Guide

Retrieving your custom ratios is simple and developer-friendly. Whether you are coding a theme from scratch or using a page builder, we have you covered.

1. Public PHP Helpers (Primary Functions)

Get Ratio URL

code_and_core_sir_get_ratio_image_url( $id, $ratio_id, $fallback = '' )

Retrieve the URL of a specific ratio variation.
* $id: Post ID or Attachment ID.
* $ratio_id: The slug of the ratio (e.g., ratio_16_9).
* $fallback: (Optional) Fallback URL if no image exists.

Get Complete Image Tag

code_and_core_sir_get_image_tag( $id, $ratio_id, $class = '', $fallback = '' )

Retrieve a fully formed tag. Note: If the ratio image is not found, this function automatically falls back to the original featured image for normal users, and displays a red warning placeholder box for administrators to easily spot missing ratios.
* $class: (Optional) CSS class for the img tag.
* $fallback: (Optional) Fallback image URL or HTML if the ratio doesn’t exist.

Check for Ratio Existence

code_and_core_sir_has_ratio( $id, $ratio_id )

Returns true if a specific ratio variation exists for the image.

Bulk Data Retrieval

$ratios = code_and_core_sir_get_all_ratios(get_the_ID());

Returns a complete array of all generated image variations for a post.

Active Ratio State

$active_ratio_id = code_and_core_sir_get_active_ratio( $post_id );

Returns the ID of the ratio currently set as “Active” for the featured image (if the ‘Set as Featured’ feature was used).

2. Implementation Examples

Simple Hero Image (Recommended)

<?php if ( code_and_core_sir_has_ratio( get_the_ID(), 'ratio_16_9' ) ) : ?>
    <div class="hero-image">
        <?php echo code_and_core_sir_get_image_tag( get_the_ID(), 'ratio_16_9', 'hero-img-class' ); ?>
    </div>
<?php endif; ?>

Custom Grid or Card

<?php
$ratio_url = code_and_core_sir_get_ratio_image_url( $post->ID, 'ratio_4_3', get_template_directory_uri() . '/assets/placeholder.jpg' );
?>
<div class="card" style="background-image: url('<?php echo esc_url( $ratio_url ); ?>');">
    <!-- Card Content -->
</div>

Advanced Loop (Display All Ratios)

$ratios = code_and_core_sir_get_all_ratios(get_the_ID());

foreach ($ratios as $ratio_id => $data) {
    if (!empty($data['url'])) {
        echo '<div class="ratio-item">';
        echo '<h4>' . esc_html($ratio_id) . '</h4>';
        echo '<img src="' . esc_url($data['url']) . '" alt="">';
        echo '</div>';
    }
}

Conditional Output (Recommended PHP Fallback)
Use this logic to safely fallback to the full featured image if a specific ratio isn’t generated.

$thumb_id = get_post_thumbnail_id();
$meta = get_post_meta($thumb_id, '_code_and_core_sir_ratios', true);
$url = !empty($meta['ratio_1_1']['url']) ? $meta['ratio_1_1']['url'] : get_the_post_thumbnail_url(get_the_ID(), 'full');

if ($url) {
    echo '<img src="' . esc_url($url) . '" alt="' . esc_attr(get_the_title()) . '">';
}

3. Shortcodes & Page Builders

Basic Usage

[code_and_core_sir_image ratio="ratio_16_9" id="123" class="hero-img"]
  • ratio: (Required) The Ratio ID (e.g. ratio_16_9)
  • id: (Optional) Attachment ID (defaults to featured image)
  • class: (Optional) Custom CSS class
  • alt: (Optional) Custom alt text (defaults to attachment alt)
  • default: (Optional) Ultimate fallback image URL

Page Builders
Working with Elementor, Divi, Beaver Builder, or Gutenberg? Simply drop the shortcode into a “Shortcode” or “Text” widget.

[code_and_core_sir_image ratio="ratio_4_5"]

4. Technical Details

Metadata Structure
The plugin stores generated ratio information in a single post meta key _code_and_core_sir_ratios for each attachment.

{
  "ratio_16_9": {
    "url": "https://example.com/wp-content/uploads/cnc-sir/2026/04/image-16x9.jpg",
    "path": "/absolute/path/to/image-16x9.jpg",
    "width": 1600,
    "height": 900,
    "mode": "crop",
    "timestamp": 1713170000
  }
}

Advanced Hooks & Filters
The settings are stored in the code_and_core_sir_settings option. Use standard WordPress filters like option_code_and_core_sir_settings to manipulate ratios or capabilities dynamically via code.

External services

This plugin connects to a third-party service at https://dashboard.wordpress-plugins.pro/ for the following purposes:

  • Deactivation Feedback: When you deactivate the plugin, an optional feedback form allows you to share why you are deactivating. If you fill this out, it sends the reason, site URL, plugin/WordPress/PHP versions, and active theme information. This helps us improve the plugin.
  • Usage Tracking (Telemetry): If you explicitly opt-in via our settings or the activation modal, the plugin will occasionally send anonymous site diagnostics (site URL, plugin/WP/PHP versions, and active theme info) to help us prioritize compatibility updates and features.

This service is provided by “WordPress Plugins Pro”: General Conditions, Privacy Policy.

Credits

This plugin utilizes the following open-source third-party libraries:

  • SweetAlert2 – Beautiful, responsive, customizable, accessible replacement for JavaScript’s popup boxes (MIT License).
  • Cropper.js – Robust JavaScript image cropper used for the interactive Media Editor (MIT License).
  • Outfit Font – Google Fonts typeface used throughout the plugin’s administration user interface (SIL Open Font License).

Installation

  1. Upload the plugin folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Navigate to Smart Image Ratio > Settings to define your desired aspect ratios.
  4. Edit any Post or Page, locate the Aspect Ratios panel under the Featured Image box in the sidebar, and click “Manage Aspect Ratios” to manually fine-tune your crops.

Changelog

Major release introducing Headless REST API suite (/wp-json/code-and-core-sir/v1/), standard WordPress REST API core post field extension, interactive API Playground console, and granular per-endpoint controls. Upgrading is recommended for decoupled frontend and headless setups.

2.0.0

  • Feature: Headless REST API Integration with full suite of public endpoints (/wp-json/code-and-core-sir/v1/posts/{id}/ratio/{ratio}, /wp-json/code-and-core-sir/v1/posts/{id}/ratios, /wp-json/code-and-core-sir/v1/attachments/{id}/ratios, /wp-json/code-and-core-sir/v1/ratios).
  • Feature: Direct Ratio Crop & Original URL Fetcher enabling instant retrieval of specific aspect ratio variations paired with original featured image URLs.
  • Feature: Core WordPress REST API Extension: Automatically embeds code_and_core_sir_ratios field directly into standard /wp/v2/posts responses for seamless Next.js, Nuxt, and Gatsby headless workflows.
  • Feature: Interactive REST API Playground & Docs: In-admin real-time API tester with interactive request runner, live response JSON viewer, copy shortcuts, and image crop preview grid.
  • Feature: Granular Endpoint & Field Customizer: Easily enable/disable individual API routes and filter response payload fields via the admin settings.
  • Security: Enhanced input sanitization, wp_unslash protection, and full WordPress.org Coding Standards (WPCS) compliance.
  • Optimization: Improved query performance and asset versioning for cached environments.

1.0.3

  • Fix: Prevented redirect during bulk plugin and WP-CLI activation.
  • Fix: Improved telemetry popup scope to ensure it only appears on the plugin settings page.

1.0.2

  • Fix: Telemetry popup visibility restricted to settings page.
  • Fix: Prevented redirect during bulk plugin activation.

1.0.1

  • Compatibility: Tested and 100% compatible with WordPress 7.1.
  • Feature: Preparation for Secure Freemium & Pro Model architecture.

1.0.0

  • Feature: Custom Aspect Ratios with Interactive Cropper.js editing.
  • Feature: Smart Blur-Fill engine for non-standard image compositions.
  • Feature: “Data & Cleanup” settings for automatic variation/metadata deletion upon attachment removal.
  • Feature: Atomic Metadata Infrastructure preventing race conditions during concurrent updates.
  • Security: Security Hardening with strict capability checks and automatic directory protection (index.php).
  • Feature: 100% Native Asset Hosting (Zero remote CDN dependencies for complete privacy compliance).
  • Feature: Direct SQL monitoring for instant “Stop” button response.
  • Feature: Modern, SaaS-inspired card-based UI with SweetAlert2 integration.
  • Architecture: 100% strict WPCS (WordPress Coding Standards) and PluginCheck compliance.
  • Architecture: Comprehensive codebase inline documentation (PHPDoc, JSDoc, CSSDoc).
  • Initial stable release.

Full changelog on WordPress.org →

Screenshots

Dashboard Settings: Define your custom ratios and processing modes.
Dashboard Settings: Define your custom ratios and processing modes.
Post Editor Panel: Interactive Cropper.js interface launched directly from the Featured Image sidebar for pixel-perfect adjustments.
Post Editor Panel: Interactive Cropper.js interface launched directly from the Featured…
Smart Fill in Action: Visual example of how the background blur-fill technology handles non-standard images.
Smart Fill in Action: Visual example of how the background blur-fill technology handles…
Data Cleanup Dashboard: One-click utilities for wiping plugin metadata and clearing generated images.
Data Cleanup Dashboard: One-click utilities for wiping plugin metadata and clearing…
Gutenberg Integration: Managing image ratios directly within the WordPress block editor side panel.
Gutenberg Integration: Managing image ratios directly within the WordPress block editor…

For developers

Is this your plugin? Show off the numbers.

Add a live badge to your site, docs or GitHub README. It updates on its own — no account needed.

Active installs badge Rating badge Health score badge

Best Code and core alternatives

All aspect ratio plugins →
Alternatives
Rank Plugin Active installs Rating Updated Health
1 WP SmartCrop WP SmartCrop WP SmartCrop will crop your images on-the-fly to match your CSS, keeping the main focal… by Bytes.co 4K+ ★★★★★★★★★★ 3.7 (9) 2 years ago 25
3 Image Dimensions Display Image Dimensions Display Displays image dimensions, aspect ratio, and recommended size in the WordPress media… by onlinewebgrow 20+ ★★★★★★★★★★ No reviews 2 years ago 27
4 Parisia Media – WebP & AVIF Images, Smart Resize, AI Alt Text Parisia Media WebP & AVIF conversion, smart resize per placement, AI alt text and extra aspect ratios… by parisia <10 ★★★★★★★★★★ No reviews 1 month ago 60

FAQ

Code and core – Smart Image Ratio: quick answers

Straight answers, pulled from live WordPress.org data.

Source: WordPress.org

Is Code and core free?

Yes. Code and core is free to download and use from the official WordPress.org plugin directory.

Is Code and core safe to use in 2026?

Code and core is a solid plugin choice in 2026, with a few things worth checking first. It runs on 50+ sites and was last updated 2 months ago, and scores 64/100 on our health check.

How many websites use Code and core?

Code and core is active on 50+ WordPress websites and has been downloaded 1,138 times since it launched in August 2026. It was downloaded 234 times in the last 30 days.

Does Code and core work with WordPress 7.1?

Yes. The developer has tested Code and core up to WordPress 7.1.5, the latest release. It requires WordPress 5.0 or newer.

When was Code and core last updated?

The latest version, 2.0.0, was released on October 8, 2026 (2 months ago).

Who makes Code and core?

Code and core is developed and maintained by Code and core.

What are the best alternatives to Code and core?

The most popular alternatives to Code and core are WP SmartCrop (4K+ installs), Image Dimensions Display (20+ installs) and Parisia Media (<10 installs).

Powered by PageForge

One template and a spreadsheet. A real page for every search.

PageForge turns each row of a CSV into a WordPress page with its own title, URL, SEO fields and schema, built on the layout you already designed. Free on WordPress.org.

  • CSV and XLSX, plus Google Sheets on Professional and Enterprise
  • Its own title, URL, SEO fields and schema for every page
  • Works with the block editor, Elementor, Divi and Avada
  • Free on WordPress.org, no credit card

↑↓ to move↵ to open