Thank you for your question.
You have to develop custom code using the plugin is_ajax_image_size hook declared in the below plugin file.
https://plugins.trac.ww.wp.xz.cn/browser/add-search-to-menu/trunk/public/class-is-ajax.php#L366
Best regards,
Thanks, managed to get this code to do it:
<?php
add_filter( ‘is_ajax_image_size’, ‘my_ajax_image_size’, 10, 1 );
function my_ajax_image_size( $image_size ) {
// Check if the current image size is the default thumbnail size
if ( $image_size === ‘thumbnail’ ) {
// Set the new image size to the desired aspect ratio (16:9)
$new_size = array( round( 16 / 9 * get_option( ‘thumbnail_size_w’ ) ), get_option( ‘thumbnail_size_h’ ) );
$image_size = $new_size;
}
// Return the modified image size
return $image_size;
}
You are always welcome here 🙂