Overview
Kentro (Greek for center or focus) is a highly performant, zero-bloat WordPress plugin designed to give you precise control over how images are cropped and resized on the frontend. When themes use CSS object-fit: cover, they default to 50% 50% center cropping. Kentro allows you to set visual focal points that keep key subjects visible across all viewports.
Architectural Rationale:
Modern responsive web designs rely heavily on CSS object-fit: cover, which defaults to centering images at 50% 50%. Important subjects (faces, products, hero landmarks) get awkwardly cut off on mobile screens. Destructive thumbnail cropping plugins generate dozens of redundant image files, bloating server storage. Kentro calculates sub-pixel percentages non-destructively, injecting dynamic CSS variables with zero disk bloat.
Developer Integration
// Retrieve image focal point in custom theme templates
$focal = Kentro\get_focal_point($attachment_id);
echo '<img src="' . esc_url($url) . '" style="object-position: ' . esc_attr($focal['css']) . ';">';
// Enable independent mobile focal points via filter
add_filter('kentro_enable_mobile_focal_point', '__return_true');
WP-CLI: $ wp kentro set-point <attachment_id> --x=45 --y=20
Deployment Notes
Works out-of-the-box with Advanced Custom Fields (ACF) image return arrays and native Gutenberg core Image blocks.