Your theme (or a plugin) is enlarging the gallery images (with Javascript). The related post gallery is basically the same as a WP gallery.
https://keesiemeijer.wordpress.com/related-posts-by-taxonomy/post-thumbnails/#markup
The only way to disable this is to remove the css selector gallery
from the related posts gallery. This also means you lose the styling your theme provides for the related galleries.
https://keesiemeijer.wordpress.com/related-posts-by-taxonomy/post-thumbnails/#styling
Try it with this in your (child) theme’s functions.php file
add_filter( 'gallery_style', 'widget_remove_gallery_class' );
function widget_remove_gallery_class( $style ) {
if ( false !== strpos( $style, 'related-gallery' ) ) {
$style = str_replace( "class='gallery ", "class='", $style );
}
return $style;
}
This strips the gallery
CSS selector from the div. Hopefully this is the selector used by your theme (or plugin).
Check if the thumbnails now link to the related posts. If it does and the related posts gallery is looking different than a WP gallery add the (theme) styles back with the following steps
Look in your (child) theme’s CSS file for any of the gallery selectors like .gallery
. Copy the styles and paste them in the Additional CSS module of the customizer. Replace .gallery
with .related-gallery
to have the same style your theme uses for (related) galleries.
btw:
consider creating a child theme instead of editing your theme directly – if you upgrade the theme all your modifications will be lost. Or create a plugin with the code above.